I’ve been struggling to make a “deploy” round system with the player ability to join ongoing match when it started before joining to the experience and etc. Is there any way for “everything for the player” to work only when there’s ongoing match?
I appreciate any help provided!
script.Parent.PlayButton.MouseButton1Click:Connect(function()
if Process == true then return end --not important
Process = true --not important
-- this works when there's no ongoing match
rs.Deny.OnClientEvent:Connect(function(plr)
script.Parent.Warning.Visible = true
task.wait(3)
script.Parent.Warning.Visible = false
end)
--some server things
rs.RemoteEvents.PlayPressed:FireServer(Player)
Click:Play() --not important
Black:Play() --not important
wait(0.5) --not important
--[[everything for the player (intended to work when there's ongoing match,
idk how to do that right:( )]]
script.Parent.PlayButton.Visible = false
script.Parent.SettingsFrame.Visible = false
script.Parent.CreditsFrame.Visible = false
script.Parent.SettingsButton.Visible = false
script.Parent.CreditsButton.Visible = false
script.Parent.ShopButton.Visible = false
script.Parent.ShopFrame.Visible = false
script.Parent.Parent.LoadoutGui.Indicator.Visible = true
script.Parent.Parent.LoadoutGui.Loadout.Visible = false
script.Parent.Parent.LoadoutGui.ToggleLoadoutGui.Visible = false
script.Parent:WaitForChild("GameMusic").Playing = false
--camera
task.wait(0.1)
Camera.CameraType = Enum.CameraType.Custom
Camera.CameraSubject = Player.Character.Humanoid
UnBlack:Play() --not important
Process = false --not important
end)