I keep getting this error in the dev console ingame "Torso is not a valid member of Model"
Here's my script:
local character =game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:wait()
local player = game.Players.LocalPlayer
local Target = player.Character.Torso
local Camera = game.Workspace.CurrentCamera
local PosBin = script.PosBin
local RotBin = script.RotBin
local Increment = .1
Camera.CameraSubject = Target
game:GetService("RunService").RenderStepped:connect(function()
Camera.CameraType = "Scriptable"
Camera.CoordinateFrame = Camera.CoordinateFrame:lerp(CFrame.new(Target.Position) *
CFrame.Angles(RotBin.Rotx.Value, RotBin.Roty.Value, RotBin.Rotz.Value) *
CFrame.new(PosBin.Posx.Value, PosBin.Posy.Value, PosBin.Posz.Value), .1)
end)
_G["RequestCameraRotation"] = function(Rotx, Roty, Rotz)
RotBin.Rotx.Value = Rotx
RotBin.Roty.Value = Roty
RotBin.Rotz.Value = Rotz
end
_G["RequestCameraMovement"] = function(Posx, Posy, Posz)
PosBin.Posx.Value = Posx
PosBin.Posy.Value = Posy
PosBin.Posz.Value = Posz
end
_G["RequestCameraReset"] = function()
Camera.CoordinateFrame = CFrame.new(Target.Position) *
CFrame.Angles(-13.37,0,0) *
CFrame.new(-1.5,0,29)
RotBin.Rotx.Value = -13.37
RotBin.Roty.Value = 0
RotBin.Rotz.Value = 0
PosBin.Posx.Value = -1.5
PosBin.Posy.Value = 0
PosBin.Posz.Value = 18
end
_G.RequestCameraReset()
Any ideas here guys?
seansy - Horror Dev |