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

Summoning handle for tool script not working?

So, i'm new to scripting but whipped up a quick tool script, which won't work. I've tried to make it where the handle goes into the tool but it just won't work! The code is

TheTool = Instance.new("Tool", Workspace) TheTool.Name = "Echo" wait(5) TheHandle = Instance.new("Part", Echo) TheHandle.Name = "Handle" local copy = game.Workspace.Echo:Clone() copy.Parent = game.Players.LocalPlayer.Character

Please help!

2 comments

2

You can only use localplayer in a local script, and can you put your code in a code block so it's easier to read?

0

Why not just have the handle already inside the tool?

1 answer

✓ Accepted answer

I recommend putting the tool itself in ServerStorage or ReplicatedStorage. So what I would do is I would put the tool Echo in ReplicatedStorage. Another thing that you should do is put this in a LocalScript in StarterPack. What this code technically does is gets the tool from ReplicatedStorage, then it clones it to the player Backpack and StarterPack

local toolStorage = game:GetService("ReplicatedStorage")
local tool = toolStorage:WaitForChild("Echo")
local player = game.Players.LocalPlayer
local backpack = player:WaitForChild("Backpack")
local starterPack = game:GetService("StarterPack")
tool:Clone().Parent = backpack
tool:Clone().Parent = starterPack

Please put your code in code block (Press the Lua button, then put your code inside the lines) Please accept my answer if it helped you.

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