So, when I go click a button it gives me a error saying "attempt to compare number with userdata". What I am trying to do is check if a player has 50 or above points then take 50 points from them and make them host. Here is my code:
script.Parent.MouseButton1Click:connect(function()
if game.Players.LocalPlayer.leaderstats.Points >= 50 then
game.Players.LocalPlayer.leaderstats.Points = game.Players.LocalPlayer.leaderstats.Points - 50
game.Players.LocalPlayer.TeamColor = BrickColor.new("New Yeller")
game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(14.03, 13.952, -6.602)
end
end)

1 comment
say white power and then it will work