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

My script I made is not really working at all! Can you see what's wrong? [closed]

Asked by 5 years ago
Edited 5 years ago

here is my code :

local debounce = true

script.Parent.Touched:Connect(function(hit)
    if debounce == true then    
        if hit.Parent:FindFirstChild("Humanoid") then

            local char = hit.Parent
            local player =  game.Players:GetPlayerFromCharacter(char)
--//------------------------------------------------------------------------------------------------------------------------------------------\\--
            print("Sold!")
            debounce = false
            player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + player.Knowledge.Value
            player.Knowledge.Value = 0
            wait(1)
            debounce = true
        end
    end
end)
0
no hellmatic 1523 — 5y

Closed as Non-Descriptive by EpicMetatableMoment, ChemicalHex, SaltyPotter, and TheeDeathCaster

This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.

Why was this question closed?