It’s supposed to just update the billboard GUI until enough players for a game are standing on the block, but instead, as soon as 1 person touches the block the game starts. I looked myself and it stops somewhere around “print(“7”)”
the output box was
1wagwan
7
clip:
local repstorage = game:GetService("ReplicatedStorage")
local gameplate = repstorage.ShockwaveBaseplate
local startblock = game.Workspace:FindFirstChild("StartingBlock")
local killzone = repstorage.KillZone
local tele1 = workspace.Teleporters.Tele1
local tele2 = workspace.Teleporters.Tele2
local tele3 = workspace.Teleporters.Tele3
local tele4 = workspace.Teleporters.Tele4
local numOfPlayersGUI = workspace.StartingBlock.BillboardGui.TextLabel
local voted = game:GetService("ReplicatedStorage").Voted
local deb = false
local Teleporters = {
workspace.Teleporters.Tele1,
workspace.Teleporters.Tele2,
workspace.Teleporters.Tele3
}
local list = {
}
workspace:WaitForChild("StartingBlock").Touched:Connect(function(touched)
if touched.Parent:FindFirstChildOfClass("Humanoid") and deb == false then
if touched.Parent:FindFirstChild("Voted") then return end
deb = true
local player = touched.Parent
local hasVoted = voted:Clone()
hasVoted.Parent = player
table.insert(list, game.Players:GetPlayerFromCharacter(touched.Parent))
deb = false
end
while #list <= 4 do
wait(0.5)
workspace.StartingBlock.BillboardGui.TextLabel.Text = #list.."/8 Players"
print(#list.."wagwan")
print("7")
if #list <= 4 then
repeat wait() until #list == 4
print(#list.."ok2")
startblock.Touched:Connect(function(touched, player)
print(#list.."ok")
for i,v in pairs(game.Players:GetChildren())do
print(#list.."ok3")
gameplate.Parent = workspace
killzone.Parent = workspace
gameplate.Position = Vector3.new(0,500,0)
killzone.Position = gameplate.Position - Vector3.new(0,10,0)
tele1.Position = gameplate.Position + Vector3.new(50,2,50)
tele2.Position = gameplate.Position + Vector3.new(-50,2,-50)
tele3.Position = gameplate.Position + Vector3.new(-50,2,50)
tele4.Position = gameplate.Position + Vector3.new(50,2,-50)
local HRP = v.Character:WaitForChild("HumanoidRootPart")
local n = math.random(1, #Teleporters)
HRP.CFrame = Teleporters[n].CFrame
end
end)
end
You do not. There is no TouchEnded, or checking that the player hasn’t already stepped on the plate. You have a ‘debounce’ that isn’t even doing anything. It’s getting immediately set to false as soon as it’s set to true.