Hello!
So I’m trying to make a game where you can control your hands to propulse in air using inverse kinetics (IK).
While making it, I encountered a problem:
When I click with my mouse, the attachment in the humanoid root part which is supposed to watch in the direction of the mouse 3D location, doesn’t look at it and takes a weird orientation.
Here is a video of what is happening:
Here is the part of the script with the attachment (Server side):
remote2.OnServerEvent:Connect(function(plr,state,mult,mouseLoc) -- fired with a "while true do" loop from the client side until he releases the mouse button 1.
local char = plr.Character
local hrp = plr.Character.PrimaryPart
local rightLower = char.RightLowerArm
local boost = rightLower.BoostPart
local mass = getMass(char)
local att = hrp:FindFirstChild("Attachment")
if state == "Start" then
att.CFrame = CFrame.lookAt(att.Position, mouseLoc) -- which is the mouse location
elseif state == "Stop" then
if mult == 0 then
end
end
end)
Is there any ways to make that works ? I’m pretty sure it’s with the attachment orientation which turns to 180 to -180.
Any helps appreciated!