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)
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?