3
This commit is contained in:
1 parent
2969bae43e
commit
6c4e5cf095
3 files changed
+28
No files matched your search
@@ -64,6 +64,9 @@ local matches: {[string]: Match} = {
|
||||
local join = Instance.new("RemoteEvent")
|
||||
join.Name = "JoinTeam"
|
||||
join.Parent = state
|
||||
local leave = Instance.new("RemoteEvent")
|
||||
leave.Name = "LeaveArena"
|
||||
leave.Parent = state
|
||||
local cycleSkin = Instance.new("RemoteEvent")
|
||||
cycleSkin.Name = "CycleRifleSkin"
|
||||
cycleSkin.Parent = state
|
||||
@@ -376,6 +379,11 @@ local function joinError(player: Player, match: Match, side: Side, now: number):
|
||||
return nil
|
||||
end
|
||||
|
||||
leave.OnServerEvent:Connect(function(player: Player)
|
||||
if not roster[player] or player:GetAttribute("InArena") ~= true then return end
|
||||
sendToLobby(player)
|
||||
end)
|
||||
|
||||
local function tryJoin(player: Player, match: Match, side: Side, now: number): string
|
||||
local issue = joinError(player, match, side, now)
|
||||
if issue then return issue end
|
||||
|
||||
Reference in new issue
Block a user