Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
1

Tool cloned from replicated storage to the player's backpack doesn't work like the original does?

Asked by 16 days ago
Edited 16 days ago

So I am making a shop and when you buy it, it of course gives you the item but then the item that is cloned to your inventory doesn't actually work as it supposed to. I have even moved the tool to my StarterPack and it works fine but when I put it in the shop it just doesn't work. This is the script inside the tool.

local Smasher = script.Parent
local Tool = Smasher.Parent
local PlayerModel = Tool.Parent.Parent
local Player = game.Players:FindFirstChild(PlayerModel.Name)

local debounce = false
local timer = 1
if debounce == false then
    debounce = true
    Smasher.Touched:Connect(function(hit)
        if hit.Name == "SodaBottle" then
            hit.Health.Value = hit.Health.Value - 25
            if hit.Health.Value <= 0 then
                hit:Destroy()
                if Player.Sodas.Value < Player.MaxSodas.Value then
                    Player.Sodas.Value = Player.Sodas.Value + 1
                end
            end
        end
    end)
    wait(timer)
    debounce = false
end

0
What does the tool do, and what is it supposed to do? SteamG0D 1401 — 16d

Answer this question