Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

1 comment

0

I really need this for my upcoming game!

1 answer

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.