You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want to remove a player’s name from a table of players who arent eliminated. -
What is the issue? Include screenshots / videos if possible!
I can’t figure out how to properly do this. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have looked at and tried many methods to do this, but cant find one that works (with my implementation of it)
I haven’t used tables or dictionaries, so i dont know much about them.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
--!nolint explosion
--!nocheck
local Rounds = {}
function Rounds.StartRound(countdown, playercount)
local players = game.Players:GetPlayers()
local inplayers = players
local function set(player)
local ss = game.ServerStorage
local la = "Left Arm"
local plr = player
local tnt = ss.TNT:Clone()
tnt.Parent = game.Workspace[player.Name]
local weld = Instance.new("WeldConstraint")
weld.Parent = plr.Character:WaitForChild('pospart')
local val = plr.Character.values:WaitForChild('tagged')
val.Value = true
plr.Character.Humanoid.WalkSpeed = 30
--pos calc
local pospart = plr.Character:WaitForChild('pospart')
local pos = pospart.Position
--
tnt.Position = pos
weld.Part0 = plr.Character.pospart
weld.Part1 = tnt
end
local function Explode(player)
local players = game.Players:GetPlayers()
local explosion = game.ServerStorage.explosion:Clone()
explosion.Parent = game.Workspace[player.Name].Torso
explosion.Enabled = true
game.Workspace[player.Name].values.playing.Value = false
local it = inplayers[math.random(#inplayers)]
if it ~= player then
_G.pass(player,it)
game.Workspace[player.Name].HumanoidRootPart.CFrame = game.Workspace.SpawnTP.CFrame
explosion:Destroy()
end
end
local popupmanager = require(game.ServerStorage.ModuleScript)
local timer = game.Workspace.Timer
local players = game.Players:GetPlayers()
repeat
wait(1)
timer.Value = countdown .. (' Seconds Until Next Round!')
countdown = countdown - 1
until countdown <= 0
local it = players[math.random(1, #players)]
set(it)
for i,v in pairs(game.Players:GetChildren()) do
v.Character.values.playing.Value = true
game.Workspace[v.Name].HumanoidRootPart.CFrame = game.Workspace.indev.spawns.gametp.CFrame
end
local ci = game.Workspace.CurrentIT
local itchar = game.Workspace[it.Name]
print(itchar)
ci.Value = itchar
print("IT : "..(it.Name))
local inplayers = players
local t = 40
repeat
repeat
wait(1)
timer.Value = t .. (' Seconds Until Explosion!')
t = t - 1
until t <= 0
t = 40
local ci = game.Workspace.CurrentIT
print(inplayers)
Explode(ci.Value)
print(ci.Value)
inplayers.remove(ci.Value)
print(#inplayers)
print(inplayers)
until #inplayers <= 1
for i,v in pairs(game.Players:GetChildren()) do
game.Workspace[v.Name].HumanoidRootPart.CFrame = game.Workspace.SpawnTP.CFrame
local winner = inplayers[1]
ci.Value.Character.values.tagged.Value = false
ci.Value.Character.values.playing.Value = false
winner.Character.values.playing.Value = false
local tnt = ci.Value.TNT
tnt:Destroy()
winner.Character.values.tagged.Value = false
popupmanager.PopUp(v, 'Winner!', winner.Name .. " Won the game!")
end
end
return Rounds
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.