Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My characters position changed whenever I equip my tool?

Asked by 6 years ago

GIF Below

https://gyazo.com/3130ce334e3d77d5e1763363f3566972

This has been happening to all my tools, I've asked this question a couple times but the answer is always "Change CustomPhysicalProperties Density" which hasn't worked. Help would be appreciated.

tool = script.Parent
local player = game.Players.LocalPlayer or game.Player:WaitForChild("LocalPlayer")
character = player.Character or player:WaitForChild("Character")
rhand = character:FindFirstChild("RightHand")
hum = character.Humanoid
jitte = tool.Jitte

tool.Equipped:connect(function()
    jitte.CFrame = rhand.CFrame * CFrame.new(0,0,-3.2)
    local weld = Instance.new("Weld")
    weld.Parent = tool
    weld.Part0 = jitte
    weld.C0 = jitte.CFrame:inverse()
    weld.Part1 = rhand
    weld.C1 = rhand.CFrame:inverse()
    jitte.Anchored = false
end)

Answer this question