Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Can you help me fix my glitchy script ?

player = game.Players.LocalPlayer
mouse = player:GetMouse()
character=player.Character
tool=script.Parent.Parent

tool.Equipped:connect(function()
	
	mouse.Move:connect(function()
	
player.Character.Torso.CFrame = CFrame.new( player.Character.Torso.Position,mouse.Hit.p)



end)
end)

Its in a Localscript in handle.

This works, but its kinda glitchy. The problem is that when the Character turns to the mouse it gets unbalenced and usually falls. Can you help me fix this script or tell me how to make a better one ? Thank you !

2 answers

There's no issue with the script, but I see what you mean. There's no easy way to solve this, unless you use an advanced algorithm to prevent the mouse from getting near the player.

Can I ask what you plan to use it for?

1 comment

0

is there any other way to do this ?

This discussion is preserved as it was. New answers, comments, and votes are closed.