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

I am having an error that has to do with userdata! Help??

Asked by
s1muIate -35
6 years ago

script.Parent.MouseButton1Down:connect(function() local player = game:GetService("Players").LocalPlayer if player.leaderstats.Money.Value >= player.leaderstats.RebirthRequireMentValue then

    player.leaderstats.Money.Value = 0
    player.leaderstats.Rebirths.Value = player.leaderstats.Rebirths.Value + 1
    --ITEMS IN HERE
    player.leaderstats.NoobNoob.Value = false
    player.Starterpack.NoobNoob:Destroy()
    --ITEMS IN HERE

    player.Character.Humanoid.Health = 0

end

end)


I was just wondering why and how to fix the error: attempt to compare userdata with number

0
I really need this for my upcoming game! s1muIate -35 — 6y

1 answer

Log in to vote
0
Answered by
EgoMoose 802 Moderation Voter
6 years ago

player.leaderstats.RebirthRequireMentValue Is just an object. I don't know the exact problem b/c I can't see your game files or the code all that well, but one way or another you're likely missing a .Value at the end of that.

Ad

Answer this question