Advertisement
Noobie_on_YT

FnafTweenCam

Feb 15th, 2022
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. local Camera = workspace.CurrentCamera
  2. local Views = workspace:WaitForChild("Views")
  3. local tweenService = game:GetService("TweenService")
  4. local Button = script.Parent
  5.  
  6. function tweenCamera(pos,tweenTime)
  7. tweenService:Create(Camera,TweenInfo.new(tweenTime,Enum.EasingStyle.Linear), {CFrame = pos.CFrame}):Play()
  8. end
  9.  
  10. Button.MouseEnter:Connect(function()
  11. tweenCamera(Views.ViewLeft, 0.5) -- Change name of your part and time
  12. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement