Tool disaperas few seconds after equip

You can write your topic however you want, but you need to answer these questions:

  1. I want my tool to dont disapear few sedonds after equip

  2. Tool disapear few sedonds after equip

  3. i looked for solution fro long

I disabled “requires handle” on tool and its now disapearing few seconds after equip

Custom tool handling scripts:

-- Local
local players = game:GetService("Players")
local tool = script.Parent
tool.Equipped:Wait()
local plr = players.LocalPlayer
local char = plr.Character

tool.Equipped:Connect(function()
	game.ReplicatedStorage.Events.ConnectM6D:FireServer(tool, tool.Gun.BodyAttach)
	char.Torso.ToolGrip.Part0 = char.Torso
	char.Torso.ToolGrip.Part1 = tool.Gun.BodyAttach
	print("equiped")
end)

tool.Unequipped:Connect(function()
	game.ReplicatedStorage.Events.DisconnectM6D:FireServer(tool, tool.Gun.BodyAttach)
	print("unequiped")
end)
--server
game.ReplicatedStorage.Events.ConnectM6D.OnServerEvent:Connect(function(plr, tool, BodyAttach)
	plr.Character.Torso.ToolGrip.Part0 = plr.Character.Torso
	plr.Character.Torso.ToolGrip.Part1 = tool.Gun.BodyAttach
end)

game.ReplicatedStorage.Events.DisconnectM6D.OnServerEvent:Connect(function(plr, tool, Attach)
	plr.Character.Torso.ToolGrip.Part0 = ""
	plr.Character.Torso.ToolGrip.Part1 = ""
end)

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

2 Likes

Why did you use tool.Equipped:Wait() ?

2 Likes

I need to stuff be done when tool gets equiped else it might reference other stuff

Oh wait i changed it to local ill delete :wait

are there any errors in the ouput?

No the output is clear no errors

Why not define them in rbxscriptconnection or tool.Equipped:Connect() function

That might be because it yields infinetly

I dont need :wait() i just realised, i dont use function cause i dont like local vatiables

game.ReplicatedStorage.Events.DisconnectM6D.OnServerEvent:Connect(function(plr, tool, Attach)
	plr.Character.Torso.ToolGrip.Part0 = "" -- change to nil
	plr.Character.Torso.ToolGrip.Part1 = "" -- change to nil
end)

and what is BodyAttach?

Its motor6 i use motor6 on torso as handle for better gun anims

BodyAttach is created on local? If so then you must create it on server since server will see blank space instead of objects which are shown on the client

is it getting destroyed or falling?

No its on server by script that playes every time character is added

Just disapears its getting deleted

look in explorer if it’s still there

It is there it dont disapears (bruh chars limit)

Try searching for motor6d and check if it’s Part1 Part0 are set correctly

These are set corectly everything is working but part gets deleted thats whole problem

How much parts are there
and are they welded to each other