I have a while true do script which isn’t throwing errors but also only runs once.
x = script.Parent.Torso.PitchNRoll
Pilot = game.Players:GetPlayerFromCharacter(script.Parent)
h = game.ReplicatedStorage.GetMouseHit:InvokeClient(Pilot)
while true do
wait(0.01)
x.CFrame = (h)
print(x.CFrame)
end
I don’t know why this is, but InvokeClient is unsafe and it may have something to do with the script not getting a response.
If anyone can tell me what is going on, whether it is actually going into infinite yield, or how I can solve the problem would be greatly appreciated.
your script is running only once probably because you’re returning from the client only once, try to put the h into the while true loop
but that would cause bad performance due to its firing the client every 0.01 sec.