How would I check server info or player join info? I have a menu in my game, in it you can enable settings like Hard Mode! It teleports the player to a reserved server in the same place… but how do I know that the server is suppossed to have hard mode enabled? please help.
My teleport script:
local reservedServer=game:GetService("TeleportService"):ReserveServer(16332065898)
while plr do
game:GetService("TeleportService"):TeleportToPrivateServer(16332065898,reservedServer,{plr})
task.wait(math.random(2,7))
end
I personally think you should make the reserved place the hard mode.
For example add a place or copy the main game where there is normal mode in your lobby(first game the player hops into before getting in the reserved server) and make that place to be hard mode. That’s just how i would do it, i hope you understood!
An easy solution is to pass the mode inside the player teleport data. When all the players are teleported and the game is about to start, check the mode values of all the players that joined, then trust the values that were send the most. For example if you receive normal, normal, hard, normal assume the mode to be “normal”. That way it will also be resilient to exploiters faking their data unless most players are exploiters and all fake the same mode.
This would not work in my case(oh) since I update my game almost everyday (2-3 times if its not a school day) and this would slow down the process a lot. (CaseOh's Basics - Roblox)
Thanks! It worked.
I put this in a game manager script:
local joinData = plr:GetJoinData()
local teleportData = joinData.TeleportData
warn(teleportData)
if teleportData~=nil then
-- its a table!
if teleportData.hardmode==true then
workspace.CONFIG.Difficulty.Value=2
if plr.Name=="Lukiraq" then
else
plr:Kick("If this message appears go to the group wall of our group and say how you got it!")
end
else
workspace.CONFIG.Difficulty.Value=1
end
end
Oh and the reason there is a kick there is so that people don’t join the mode and get the badge easily when its not done lol. Thanks for helping.
Edit: I didn’t do the “normal normal hard normal” thing because “Hard Mode” is only for 1 person servers.