Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I check that the player joining the reserved server actually reserved it?

Title says it

Other script:

if Player.UserId == game.PrivateServerOwnerId then
	print("true")
else
	print("false")
end

Expected Result: true
Actual Result: false

Reserve Script:

local Code = TeleportService:ReserveServer(4805466213)
				PostKey(Code, SentFrom)
				TeleportService:TeleportToPrivateServer(4805466213, Code, {SentFrom}, "", {string.gsub(Code, "lmG0eAQAAAA2", ""), GetServerSize(SentFrom)})

4 comments

0

Are there any errors?

0

Nope, just it saying false.

0

you aren't using the LUA code block correctly, you need to paste your script between the lines

0

try the edit I did on my answer

2 answers

✓ Accepted answer

everyone forgets that a reserved server is technically a VIP server. VIPServerOwnerId is what I use for my WIP game and it works because its apart of a reserved server.

if player.UserId == game.VIPServerOwnerId then
	print("true")
else
	print("false")
end

3 comments

0

Okay, let me try. I will keep you updated!

0

Still returning false

0

I fixed it but I'll accept your answer cuz u gave me the idea.

There is nothing wrong with this script, your script to reserve the slot on the other hand is the issue, this script works. If you are trying to reserve the spot by setting the ID as the players user id then the script that does that isn't working.

if Player.UserId == game.PrivateServerOwnerId.Value then 
print("true") 
else 
print("false") end

Try that Please accept this answer if I helped!

5 comments

0

btw if you need help with that script then post that script

0

Wait no I figured it out, you need to put .Value at the end

0

My reserve server is fine. Let me make an edit to show you my reserve.

0

.Value isn't a property of PrivateServerOwnerId

0

You seem to be new to scripting zomspi.

This discussion is preserved as it was. New answers, comments, and votes are closed.