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

Why does my script only work in one Place and not in another Place?

Asked by 4 years ago

I have a script that causes a tool to be copied from the ReplicatedStorage to the backpack when you click on a brick. In my one world, this one works. However, if I copy it into my own game world, it no longer works. There is also no error displayed in the output. What could that be?

0
Could we see this script? cowsoncows 951 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

This is the script I used:

local p = game.Players.LocalPlayer
local debounce = true

script.Parent.MouseClick:Connect(function(p)
    local Backpack = p.Backpack
    local Tool = game.ReplicatedStorage.Equipment.BottleDrinks.Cola1
    local Clone = Tool:Clone()
    Clone.Parent = Backpack
    script.Disabled = true
    wait(10)                                                   
    script.Disabled = false
end)
Ad

Answer this question