I have this script STRAIGHT from the wiki, it's not working.
Interpolate( game.Players.LocalPlayer.Character.Torso.Position, game.Players.LocalPlayer.Character.Torso.Position, 1 )
It's not possible that you got that straight from the wiki since the wiki page looks like this
1) You didn't define Interpolate
.
The Interpolate function is a function of Camera
. You need to use it as a method from camera.
2) Your 1st, and 2nd arguments are the wrong datatype!
The 1st and 2nd arguments of the Interpolate function should be CFrames. You provided Vectors. To provide a CFrame, index the CFrame
property of the character's torso, rather than the Position
property.
local cam = workspace.CurrentCamera --Define the camera local plr = game.Players.LocalPlayer --Define the player cam:Interpolate( plr.Character.Torso.CFrame, --Index 'CFrame' property plr.Character.Torso.CFrame, 1 )
NOTE: Make sure this is a localscript in somewhere that replicates to the client. e.g. ReplicatedFirst, StarterPack, StarterGui.
Interpolate is a Method from a camera. This must be with a local script and, the camera type needs to be scriptable(also needs to be done in a local script).
Camera is an object in workspace and it affects the camera in the game for a player on the client. You need to set the camera type to scriptable.
--LocalScript local camera = workspace.CurrentCamera --Or Camera camera.CameraType = Enum.CameraType.Scriptable
It is a method, use it on the camera object
camera:Interpolate()
local camera = workspace.CurrentCamera --Or Camera camera.CameraType = Enum.CameraType.Scriptable camera:Interpolate( game.Players.LocalPlayer.Character.Torso.CFrame, game.Players.LocalPlayer.Character.Torso.CFrame, 1 )
Hope it helps!