I am making a script that sends information to a discord server when a player has reached a certain amount of points. Everything is working but the condition.
game.Players.PlayerAdded:Connect(function(plr)
local points = Instance.new("NumberValue",plr)
points.Name = "Points"
points.Value = 0
local url = "[My webhook]"
local http = game:GetService("HttpService")
if plr.Points >= 7.5 then
local Data = {
['content'] = plr.Name.." Passed!"
}
Data = http:JSONEncode(Data)
http:PostAsync(url, Data)
end
end)
It keeps saying "attempt to compare number with userdata"

2 comments
you gotta write plr.Points.Value in the if statement
also you can't use "[My webhook]" you gotaa use a real webhook