Ive been making this roblox game which has a leaderboard and ive came across this glitch where if i set the value to zero and get a jewel it just thinks i had the value that i had before and adds one to it
COMMUNITY QUESTION
IntValue loses count, how do i fix it?
1 answer
local there = true
script.Parent.Touched:Connect(function(pl)
if there == true then
if pl.Parent:FindFirstChild("Humanoid") ~= nil then
there = false
script.Parent.Transparency = 1
local player = game.Players:GetPlayerFromCharacter(pl.Parent)
player.leaderstats.Points.Value = player.leaderstats.Points.Value + 1
wait(5)
there = true
script.Parent.Transparency = 0.4
end
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
You should have edited your original answer. Please explain your question more thoroughly in the original post.