I've asked tons of people to get up to this point (most of the answers didn't work)
This is my script now:
print("script started") local part = script.Parent local Amount = script.Parent.Parent.Space1.SurfaceGui.Amount local TPService = game:GetService("TeleportService") print("locals 1 started") local PlayerInTable = {} local PlayersToTeleport = {PlayerInTable} local player = game.Players.LocalPlayer Amount.Text = "0/6" local counter = 0 local debounce = false print("all locals started") part.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then local character = hit.Parent local players = game.Players:GetPlayerFromCharacter(character) table.insert(PlayerInTable, players) print("player is in PlayerTable") end if PlayerInTable[player] then print("player table script running") counter = counter + 1 Amount.Text = counter.. "/6" wait(1) --// debounce timeout debounce[player] = true print(player.Name.. " is in table") else debounce = false print("player not in table") end end)
But here is the problem:
if PlayerInTable[player] then print("player table script running") counter = counter + 1 Amount.Text = counter.. "/6" wait(1) --// debounce timeout debounce[player] = true print(player.Name.. " is in table") else debounce = false print("player not in table") end end)
but goes right to the else and prints "player not in table" why?
(most people I ask just ignore me and they dont know either soo..)