Help with if/else script

Are you the CREATOR of the game? Or you can just edit it?

It is a group, and yes I own the group and the group has acess.

What does the REST API do?

The creator id you guys are using doesn’t seem to exist, it just leads me to an random account, while i thought/think that it would bring me into your account.

It is connected to my DB. So, unless I put the data in wrong it should work.

It’s owned by a group

2 Likes

[Reply deleted, 30 charsssssssss]

This is what it is based off of.

Can I know what the REST API returns. Also game.creatorId will be the Id of the group that owns the game

[{“userid”:“5196118”,“date-bought”:“2020-04-18T00:00:00.000Z”}]

This is the endpoint. https://api.cheesycorp.tk/pole/5196118

I got false. Ima try this in a real game.

I think the problem is that game.creatorId is a Number and whatever the userid you’re API returns is a string

One reason this might not be working is because if game.CreatorId is a group id like @LukaDev_0 has mentioned then user == game.CreatorId will never be true, because i’m pretty sure that user is meant to be a user id no? , thus:

    warn("Purches found.")
	print(ReceivedData)
	script.Script.Disabled = false
	script.Script:Clone().Parent = game.Workspace
	script.ScreenGui:Clone().Parent = game.StarterGui

Would never run

2 Likes

The userId is agroup id

Edit: Qutocorrect keeps making is isn’t

1 Like

Wait. Lemme try to make it a number.

OnlyJaycbee just explained some of the things you done.

Try this: if tostring(game.CreatorId) == user then

1 Like

Wow. It works. I am native in JS so lua is kinda different.

Mark my answer as the solution since I never got one