Why is studio ignoring my code?

Still updates points and everything runs fine. I just don’t get why the if won’t go through.

Juuuust in case, add print(plr.Name == "Recallity") after the Points-print. Otherwise… get an excorcist?

and copy that condition directly from the if-statement, in case it contains invisible characters somehow

I guess I’ll call an exorcist then, got any recommendations?

Maybe if I set this to studio bugs then one will find me?

Can you try on a live game?

Could try checking UserId instead I guess

That’s what I’ve been doing.

Found a possible issue. You’re passing a table to HttpService but I’m fairly sure that the post body needs to be a string. Try fixing that.

Just changed it to a string, still nothing.

1 Like

Changed it to if plr.UserId ==

Still nothing.

Does the If statement run if you remove the Http:PostAsync request?

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.

If you read the other replys I already changed it to plr.Parent, thanks
though.

1 Like

Can you try printing plr.Name to make sure it is actually what you think at that point?

This likely won’t solve your problem, but I’d recommend using UserId instead of name, as name can change at any time from the player changing their username.

@0xBAADF00D if you read above you can see I tried something like that.

Juuuust in case, add print(plr.Name == “Recallity”) after the Points-print. Otherwise… get an exorcist?

I also did add print(plr.Name) and it was Recallity.


@NoCollider Yes actually, funny thing is, once I re-add the Http:PostAsync requests it voids any changes I’ve made to the script.

Oops, I skimmed too much. Yep, get an exorcist.

EDIT: I see you deleted the Discord webhook. Shame. :wink:

You don’t have to get angry. I was just saying it’s good practice to keep using UserId instead of name.

Firstly, pcall your PostAsync, and save the return value (for all HttpService YieldFunction calls you have in your game). If that’s failing, it would be helpful to know why. Secondly, what other HttpService calls do you make? Are you sure one isn’t exceeding any of the usage limits, and you’re not trying to hit any Roblox domains with them, right? I’m wondering why you construct a URL to a user’s profile image, for example. Thirdly, have you debugged your webserver code? Is it using a REST API, and if so, have you used a REST client to do simple tests on it, make sure it’s not hanging and failing to respond to the POST?

  1. I usually do pcall, but because I was adjusting it so much, I wanted it to throw the error as plainly as possible without the hassle of adding the extra 3 lines for the pcall.

  2. (a) I use a Discord API I made and I know for a fact it’s not going over the limit because it only fires when the queue has an entry, the queue only gets an entry when the player says something, then a while loop checks every second to post one of the entries. [b] When I test, I’m not talking to myself in-game, meaning that nothing is being sent. [c] If I was going over the limit it would throw an error saying “TOO MANY REQUESTS.” [d] I’ve done research on the HTTP limits and made sure I’m in the clear.

  3. I grab the user image because…
    image

  4. I’m not that familiar with the HTTP service so I don’t really know what REST is. The only problem I see with the problems you are suggesting is that it doesn’t even throw any kind of error, nor does it print the things before the request.

Sorry if I seem rude, I’m just trying to get as much of my problem across without much filter. It’s also stressing me out a bit. :neutral_face:

Sorry, I wasn’t trying to give off an angry vibe, just trying to emphasize the text to hopefully draw more attention from other users skimming past. :grimacing: