Hello, i am trying to get a value from starter player and change it, but i can't figure out how.

Here is my code :

local TeleportService = game:GetService("TeleportService")
 
local theCity = 4923471394
local playerList = {}
 
local function onPartTouch(otherPart)

	local player = game.Players:GetPlayerFromCharacter(otherPart.Parent)
	if player then
		if player.Debouncer then -- Here i am trying to get the value
			print("Person")
			table.insert(playerList, player)
			script.Parent.Label.GUI.Say.Text = "The City (Waiting for more players!)"
			player.Debouncer = false
			
			if #playerList == 2 then
				script.Parent.Label.GUI.Say.Text = "The City"
				player.Debouncer = true
				game:GetService('TeleportService'):TeleportPartyAsync(theCity, playerList)
				
				for k in pairs (playerList) do
					playerList [k] = nil
				end
			end
		end	
	end
end	
script.Parent.Touched:Connect(onPartTouch)

Pls help!!

1 comment

1

Player doesn't even have a child/property named "Debouncer"..