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

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

Asked by
Glacitron 239 Moderation Voter
4 years ago

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

0
do you have a part named 'Handle' on the tool? Leamir 3138 — 4y
1
Yeah Glacitron 239 — 4y

3 answers

Log in to vote
0
Answered by
JesseSong 3916 Moderation Voter Community Moderator
4 years ago

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
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 Glacitron 239 — 4y
Ad
Log in to vote
0
Answered by
Nckripted 580 Moderation Voter
4 years ago

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

0
local script would at least show to him the correct thing Leamir 3138 — 4y
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 Glacitron 239 — 4y
Log in to vote
0
Answered by 4 years ago

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

1
Yes it is in the player backpack Glacitron 239 — 4y

Answer this question