Angle is a bit weird, explained more in description

function ontouched(hit)
	
	if hit.Parent.Name == "waternpc" then
		return
	end
	if hit.Parent.Name == "landnpc" then
		hit:PivotTo(hit:GetPivot() * CFrame.Angles(0,-90, 0))
		script.Disabled=true
		wait(1)
		script.Disabled=false
	end
	
end
script.Parent.Touched:Connect(ontouched)

So what this is supposed to do is, well obviously land npc’s arent supposed to be in the water, right?
So I want them to turn around if they touch water.
Instead, they turn at a weird angle (Although 90 degrees is not supposed to be a weird angle.)
Please help!

CFrame.Angles is in radians not degrees, use math.rad(-90)

(-90 radians is -5156.62 degrees, or the equivalent of a total 243.38 degree rotation)

to expand on this
math.rad() converts degrees to radians
math.deg() converts radians to degrees

2 Likes