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

Trigger event through leaderboard?

Asked by 2 years ago

I was wondering if it was possible to trigger an event through the leaderboard? Example: if leaderboard = 4 points then door opens. something like that.

1 answer

Log in to vote
0
Answered by
imKirda 4491 Moderation Voter Community Moderator
2 years ago

IntValue.Changed event is triggered every time value of this value changes, every time it changes you can check if the value is 4:

leaderstats.Points.Changed:Connect(function(value)
    if value == 4 then
        print("value changed to 4")
    end
end)
0
Thanks for the help! Worked great! YoloWarrior 2 — 2y
Ad

Answer this question