I am trying to create a tool that rotates when the player clicks, and have found that when I rotate the tool using CFrames, it causes the player to rotate with the tool. I understand this is to due with the character being welded to the tool, but how do I fix this?
Here is my current script:
local tool = script.Parent
local main = tool.Handle
local m = game.Players.LocalPlayer:GetMouse()
local ready = true
m.Button1Down:Connect(function()
if ready == true then
main.CFrame = CFrame.new() * CFrame.fromEulerAnglesXYZ(math.pi,main.Orientation.Y, main.Orientation.Z)
else
end
end)

1 comment
I figured that, would I be able to solve this with a Remote Function?