Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Are my player rotation scrpits broken?

Asked by 3 years ago

Hey, i have a weird problem

sometime ago i made these scripts that worked, but now they don't, i wasn't changing anything in them

Scripts:


local waist = script.Parent:WaitForChild("UpperTorso"):WaitForChild("Waist") local ev = script.Parent.Camera function answears(plr,newLook) waist.C0 = waist.C0:lerp(CFrame.new(waist.C0.p) * newLook, 0.1) end ev.OnServerEvent:Connect(answears)

local chr = script.Parent local waist = chr:WaitForChild("UpperTorso"):WaitForChild("Waist") local ev = chr.Camera

function fire() local look, origin = game.Workspace.CurrentCamera.CFrame, chr.HumanoidRootPart.CFrame look = look:ToWorldSpace(CFrame.new(0, 1.5, 0)) local x,y,z = look:ToEulerAnglesXYZ() local rx,ry,rz = origin:ToEulerAnglesXYZ()

x = math.clamp(x, -72, 72)
local newLook = CFrame.Angles(x,y,z)
local newOrig = CFrame.Angles(rx,ry,rz)
newLook = newOrig:ToObjectSpace(newLook)

ev:FireServer(newLook)
waist.C0 = waist.C0:lerp(CFrame.new(waist.C0.p) * newLook, 0.1)

end

game:GetService'RunService'.RenderStepped:connect(fire)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

btw, i also have an event named Camera, all of these things are in StarterPlayerScripts folder

1 answer

Log in to vote
0
Answered by 3 years ago

I have no idea what a "scrpit" is.

0
Today's your lucky day to find out what it is! It's an accidental misspelling of "script", often caused by people who either type too fast, didn't look at their keyboard, or just did it on purpose. We also like to tell people who make fun of it, what it is! 2_MMZ 1059 — 3y
0
Oh, thank you! MiAiHsIs1226 189 — 3y
0
thanks mr.helpful famepek777 1 — 3y
0
Hmm? MiAiHsIs1226 189 — 3y
Ad

Answer this question