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

How do I make the handle from a tool not fall after equipping it?

Every time I equip the tool, the handle or part falls for a sec and then goes to where its suppose too.

https://gyazo.com/f136530224aa3bfc9404670b64304dd7

LocalScript

local tool = script.Parent
local player = game.Players.LocalPlayer
local char = player.Character


tool.Equipped:Connect(function()
	game.ReplicatedStorage.Events.TestEvents.ConnectM6D:FireServer(tool.BodyAttach)
	
end)

tool.Unequipped:Connect(function()
	game.ReplicatedStorage.Events.TestEvents.DisconnectM6D:FireServer()
end)

ServerScript

local tool = game.StarterPack.Shovel
local anim = Instance.new("Animation")
anim.AnimationId = "rbxassetid://7353018496"
local PlayAnim
local M6D




game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(char)
		local M6D = Instance.new("Motor6D", char.Torso)
		M6D.Name = "ToolGrip"
		
	end)
end)

game.ReplicatedStorage.Events.TestEvents.ConnectM6D.OnServerEvent:Connect(function(player, location)
	
	local char = player.Character	
	PlayAnim = char.Humanoid:LoadAnimation(anim)
	PlayAnim:Play()
	local body = tool.BodyAttach
	char.Torso.ToolGrip.Part0 = char.Torso
	char.Torso.ToolGrip.Part1 = location
	
end)

game.ReplicatedStorage.Events.TestEvents.DisconnectM6D.OnServerEvent:Connect(function(player)
	player.Character.Torso.ToolGrip.Part0 = nil
	player.Character.Torso.ToolGrip.Part1 = nil
	PlayAnim:Stop()

	
end)

1 answer

✓ Accepted answer

Weld the tool together with WeldConstraints.

4 comments

0

This answer should be in the comments.

0

You should only make it as an answer when you need to add code. But for this case it's just 1 sentence.

0

Sorry haha, I'm super new to scripting helpers. I'll keep that in mind next time.

0

big ups

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