**[quote=“MysticOrangeLeaf, post:1, topic:1495476, full:true”]
I Need Help Making A Part Taking AWAY Points, for my halloween game, i would appreciate any help since i kind of need this out fast! Here is the code.
local db = true
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild(“Humanoid”) ~= nil then
if db == true then
db = false
script.Parent.Transparency = 1
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
player.leaderstats.Candy.Value = player.leaderstats.Candy.Value - 5
script.Sound:Play()
script.Parent.Transparency = 1
wait(12)
db = true
script.Parent.Transparency = 0
end
end
end)
[/quote]
**I Need Help Making A Part Taking AWAY Points, for my halloween game, i would appreciate any help since i kind of need this out fast! Here is the code.
local db = true
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild(“Humanoid”) ~= nil then
if db == true then
db = false
script.Parent.Transparency = 1
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
player.leaderstats.Candy.Value = player.leaderstats.Candy.Value - 5
script.Sound:Play()
script.Parent.Transparency = 1
wait(12)
db = true
script.Parent.Transparency = 0
end
end
end)