Hello! I'm trying to make a rounds system. For that, I need a normal script because every round you get gear. If I use a LocalScript, the gear doesn't work well. The rounds will be working well for the first player, but I need to be universal for every player, so one option will be inserting the script in ServerScriptService, but I can't have any access to the Player. To fix this, I thought that I can try to get the player name when getting the gear, but how can I get the player name in a normal script in ServerScriptService?
wait(10)
local Player = script.Parent.Parent.Parent
local function toround()
script.Parent.RoundsGUI.Status.Text = "Status: In round"
script.Parent.RoundsGUI.Sixty.Disabled = true
script.Parent.RoundsGUI.ThreeSixty.Disabled = false
game.Workspace.Rift.Rift.Rift.TimePosition = 9.5
game.Workspace.Rift.Rift.Rift:Play()
game.Workspace.Rift.Rift.Transparency = 0
Player.Character.HumanoidRootPart.CFrame = game.Workspace.Rift.Rift.CFrame
wait(5)
game.Workspace.Rift.Rift.Transparency = 1
end
local function tolobby()
script.Parent.RoundsGUI.RoundMode.Text = "Gamemode: "
script.Parent.RoundsGUI.Status.Text = "Status: In lobby"
script.Parent.RoundsGUI.ThreeSixty.Disabled = true
script.Parent.RoundsGUI.Sixty.Disabled = false
Player.Backpack:ClearAllChildren()
Player.Character.Humanoid.Health = 100
game.Workspace.Lobby.LobbyRift.Rift.Rift.TimePosition = 9.5
game.Workspace.Lobby.LobbyRift.Rift.Rift:Play()
game.Workspace.Lobby.LobbyRift.Rift.Transparency = 0
Player.Character.HumanoidRootPart.CFrame = game.Workspace.Lobby.LobbyRift.Rift.CFrame
wait(5)
game.Workspace.Lobby.LobbyRift.Rift.Transparency = 1
game.Workspace.Drop1.Drop.ReEnable.Disabled = true
game.Workspace.Drop1.PositionRift.Transparency = 1
game.Workspace.Drop1.Laser.Transparency = 1
game.Workspace.Drop1.Parachute.Transparency = 1
game.Workspace.Drop1.Drop.Transparency = 1
game.Workspace.Drop1.Drop.Move.Disabled = true
game.Workspace.Drop1.Drop.System.Disabled = true
game.Workspace.Drop1.Drop.Reset.Disabled = true
game.Workspace.Drop1.Drop.ReEnable.Disabled = true
game.Workspace.Drop1.Drop.BillboardGui.Enabled = false
end
local function startdrop()
game.Workspace.Drop1.Drop.ReEnable.Disabled = false
end
local function startdropmode()
game.Workspace.Drop1.Drop.ReEnable.Disabled = false
game.Workspace.Drop2.Drop.ReEnable.Disabled = false
game.Workspace.Drop3.Drop.ReEnable.Disabled = false
game.Workspace.Drop4.Drop.ReEnable.Disabled = false
game.Workspace.Drop5.Drop.ReEnable.Disabled = false
game.Workspace.Drop6.Drop.ReEnable.Disabled = false
game.Workspace.Drop7.Drop.ReEnable.Disabled = false
game.Workspace.Drop8.Drop.ReEnable.Disabled = false
end
local Value = script.Value.Value
local Gamemodes = script.Parent.Gamemodes
--Start cycle
tolobby()
Value = math.random(1, 9)
if Value == 1 then
wait(60)
script.Parent.RoundsGUI.RoundMode.Text = "Gamemode: Assault rifles only"
Gamemodes.OnlyARsMode["[NON VIP] Assault rifle"]:Clone().Parent = Player.Backpack
Gamemodes.OnlyARsMode["[NON VIP] Burst assault rifle"]:Clone().Parent = Player.Backpack
Gamemodes.OnlyARsMode["[NON VIP] Med kit"]:Clone().Parent = Player.Backpack
Gamemodes.OnlyARsMode["[NON VIP] Parachute"]:Clone().Parent = Player.Backpack
toround()
wait(360)
Value = 0
script.Parent.Reset.Disabled = false
end
if Value == 2 then
wait(60)
script.Parent.RoundsGUI.RoundMode.Text = "Gamemode: Submachine guns only"
Gamemodes.OnlySMGsMode["[NON VIP] Burst submachine gun"]:Clone().Parent = Player.Backpack
Gamemodes.OnlySMGsMode["[NON VIP] Fast fire submachine gun"]:Clone().Parent = Player.Backpack
Gamemodes.OnlySMGsMode["[NON VIP] Submachine gun"]:Clone().Parent = Player.Backpack
Gamemodes.OnlySMGsMode["[NON VIP] Suppresed submachine gun"]:Clone().Parent = Player.Backpack
Gamemodes.OnlySMGsMode["[NON VIP] Med kit"]:Clone().Parent = Player.Backpack
Gamemodes.OnlySMGsMode["[NON VIP] Parachute"]:Clone().Parent = Player.Backpack
toround()
wait(360)
Value = 0
script.Parent.Reset.Disabled = false
end
if Value == 3 then
wait(60)
script.Parent.RoundsGUI.RoundMode.Text = "Gamemode: Shotguns only"
Gamemodes.OnlyShotgunsMode["[NON VIP] Pump shotgun"]:Clone().Parent = Player.Backpack
Gamemodes.OnlyShotgunsMode["[NON VIP] Tactical shotgun"]:Clone().Parent = Player.Backpack
Gamemodes.OnlyShotgunsMode["[NON VIP] Med kit"]:Clone().Parent = Player.Backpack
Gamemodes.OnlyShotgunsMode["[NON VIP] Parachute"]:Clone().Parent = Player.Backpack
toround()
wait(360)
Value = 0
script.Parent.Reset.Disabled = false
end
if Value == 4 then
wait(60)
script.Parent.RoundsGUI.RoundMode.Text = "Gamemode: Sniper rifles only"
Gamemodes.OnlySNRsMode["[NON VIP] Sniper rifle"]:Clone().Parent = Player.Backpack
Gamemodes.OnlySNRsMode["[NON VIP] Med kit"]:Clone().Parent = Player.Backpack
Gamemodes.OnlySNRsMode["[NON VIP] Parachute"]:Clone().Parent = Player.Backpack
toround()
wait(360)
Value = 0
script.Parent.Reset.Disabled = false
end
if Value == 5 then
wait(60)
script.Parent.RoundsGUI.RoundMode.Text = "Gamemode: Drops only"
startdrop()
Gamemodes.OnlyDropsMode["[NON VIP] Parachute"]:Clone().Parent = Player.Backpack
toround()
wait(360)
Value = 0
script.Parent.Reset.Disabled = false
end
if Value == 6 then
wait(60)
script.Parent.RoundsGUI.RoundMode.Text = "Gamemode: Pistols only"
Gamemodes.OnlyPistolsMode["[NON VIP] Pistol"]:Clone().Parent = Player.Backpack
Gamemodes.OnlyPistolsMode["[NON VIP] Suppresed pistol"]:Clone().Parent = Player.Backpack
Gamemodes.OnlyPistolsMode["[NON VIP] Med kit"]:Clone().Parent = Player.Backpack
Gamemodes.OnlyPistolsMode["[NON VIP] Parachute"]:Clone().Parent = Player.Backpack
toround()
wait(360)
Value = 0
script.Parent.Reset.Disabled = false
end
if Value == 7 or 8 or 9 then
wait(60)
script.Parent.RoundsGUI.RoundMode.Text = "Gamemode: Classic gameplay"
startdrop()
Gamemodes.ClassicMode["[NON VIP] Assault rifle"]:Clone().Parent = Player.Backpack
Gamemodes.ClassicMode["[NON VIP] Burst assault rifle"]:Clone().Parent = Player.Backpack
Gamemodes.ClassicMode["[NON VIP] Pump shotgun"]:Clone().Parent = Player.Backpack
Gamemodes.ClassicMode["[NON VIP] Tactical shotgun"]:Clone().Parent = Player.Backpack
Gamemodes.ClassicMode["[NON VIP] Submachine gun"]:Clone().Parent = Player.Backpack
Gamemodes.ClassicMode["[NON VIP] Med kit"]:Clone().Parent = Player.Backpack
Gamemodes.ClassicMode["[NON VIP] Parachute"]:Clone().Parent = Player.Backpack
toround()
wait(360)
Value = 0
script.Parent.Reset.Disabled = false
end
If you can tell me something to change in the script to get the player name, answer this question.

2 comments
Lots of ways to get the player from a server script: https://scriptinghelpers.org/questions/58244/how-do-i-reference-the-player-from-a-server-script
Alright, thank you!