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

Why wont my tool model show up after cloning it from the replicated storage? ( still unanswered)

Basically I use this script to clone the tool from replicated storage into the players backpack

local tool = game:GetService("ReplicatedStorage").UnknowingFire
local plr = game:GetService("Players").LocalPlayer

script.Parent.Activated:Connect(function()
	tool:Clone().Parent = plr.Backpack
	script.Parent.Parent:Destroy()
end)

However what happens is when I load into the game and take the script after pressing the button, I get the tool selected GUI, however the tool does not show up in my hand, my player does all the animations that would happen with the tool in my hand, as well as the scripts of attacking blocking, etc. I can also see the model in workspace and it gets the effects from when I would attack with (Fire particles on the sword when I attack), so everything works except for the fact that the sword isn't in my hand. I tried solving this by anchoring it, but all it does is stick me to the workspace: https://gyazo.com/b54691f5c260920a55578f5dcc1eb14e

A gif of the problem: https://gyazo.com/5dc281fef542ce00f4474792301d5d98

2 comments

0

do you have a part named 'Handle' on the tool?

1

Yeah

3 answers

✓ Accepted answer

First you should make a part called Handle. This will actually make it work then add a weld this will hold your tool together. and then Insert a local script

Learn more about tools visit: https://developer.roblox.com/en-us/api-reference/class/Tool

script:

local tool = game:GetService("ReplicatedStorage").UnknowingFire
local plr = game.Players.LocalPlayer
script.Parent.Activated:Connect(function()
    tool:Clone().Parent = plr.Backpack -- The name of your tools then it clones it to the backpack
    if tool.Activated
                   then
   script.Parent.Parent:Destroy()
end
end)

1 comment

1

I already have a handle and it still won’t work, like I said the tool shows up and the animations play it just doesn’t appear in my hand like I want it to

Probably becuase you are using a LocalScript. Use remote events.

2 comments

0

local script would at least show to him the correct thing

1

If you were right the tool wouldn’t show up in the first place, the tool is there it just doesn’t appear in my hand

Your function executes when the tool is activated. Is your tool in starter pack so the player has it?

1 comment

1

Yes it is in the player backpack

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