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

IntValue loses count, how do i fix it?

Asked by 5 years ago

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

1 answer

Log in to vote
0
Answered by 5 years ago
Edited by M39a9am3R 5 years ago
    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)
0
You should have edited your original answer. Please explain your question more thoroughly in the original post. M39a9am3R 3210 — 5y
Ad

Answer this question