Please help I've been trying to fix this glitch for hours. Here's the script.
while true do
wait(20) --time in seconds
if tool == nil then
tool = clone:Clone()
tool.Parent = script.Parent
end
end
Thanks
Please help I've been trying to fix this glitch for hours. Here's the script.
while true do
wait(20) --time in seconds
if tool == nil then
tool = clone:Clone()
tool.Parent = script.Parent
end
end
Thanks
You have it all wrong.
You have to have 3 things set up:
1: The tool in either the ReplicatedStorage or Lighting
2: A touch script
3: Your character's Backpack
This is how the script would look:
(Regular script inside of the brick)
script.Parent.Touched:Connect(function(hit)
local tool = game.ReplicatedStorage:WaitForChild("RenameTool")
local starterpack = game.Players:FindFirstChild(hit.Parent.Name).Backpack:GetChildren()
for i, v in pairs(starterpack) do
if v == nil then
tool:Clone().Parent = game.Players:FindFirstChild(hit.Parent.Name).Backpack
else
return print("Already have tool")
end
end
end)
(This was off the top of my head, I haven't tested it sooo gl :P)
Why would it be in Lighting? And why are you returning a value from an event listener?
eh return makes it look more professional, you could just do "print" but meh why not use return? works the same way :3 (also you can put tools in lighting for cloning)
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
can u pls send a complete snippet
also ur checking wether the tool does not exist and the cloning the tool if it does not exist. this is wong