Yeah so it’s 2:32 AM and I’m apparently trying to work a miracle here.
For whatever reason, studio refuses to jump into this line of code, I made the If statement as bland as possible and it just won’t run.
if plr.Name == "Recallity" or plr.UserId == 19163567 then
print(plr:GetRankInGroup(3600159))
print(Points.Value)
print("Promoting "..plr.Name)
Http:PostAsync("https://#########.herokuapp.com/promote/3600159/"..plr.UserId.."/",{})
end
I’m joining on my alt ‘Recallity’ and it’s not working for some odd reason, the code in front of it and the code behind it are working just fine no errors, nothing
I’ve adjusted the if statement at least 10 times to try different ways
If you find it in the paste bin, the “Points” above it does print out, and it does change the points leaderstat value
Also on one of the last tests, I got this error locally. (not on the server side where this code is located) I don’t think its relevant though
UPDATE: So if I delete the Http:PostAsync the if statement goes through, but if I re-add it, it voids every change I’ve made to the script after I’ve re-added it.’
Also please read all the replies before you post a suggestion.
Just in case, under the print("Points"), add a print(plr.Name)
plr ~= nil should always be true, and I think wait() still returns a value, so the only remaining thing that could stop it from reaching the if-statement is the player’s name.
Only thing that I can think off now is that print(plr:GetRankInGroup(3600159)) yields forever (or at least long enough to trick you). Does it still update the points every 10s, or just once after joining?
FYI if plr ~= nil will never fail. It exists since you still reference it. Instead, use if plr.Parent ~= nil. That won’t solve your problem, but wanted to throw that out real quick.