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!