Okay, so earlier today I was experimenting with this game I was making, but there's this line of code that doesn't work. It basically gathers the usernames of people who touched this part, and then places it in a table. But it won't show up on this Gui's text. It just says " won. " Here is the code that doesn't work. (even when i print it it shows up)

	local function falsepressed(player)
	if enabled == true then
	if game.Players:GetPlayerFromCharacter(player.Parent)then
	if checktable(nametable, player.Parent.Name) ~= true then
	print("Testing testing Testing 1 2 3")
	table.insert(nametable, player.Parent.Name)
	print(table.concat(nametable, ', '.." won."))	
	end
	end
	end
	end
	pgui:FindFirstChild("GameGui").Intermission.Text = "The answer was " ..answer
	wait(1)
	player.Character.Humanoid.Health = 0
	truepart.Touched:connect(truepressed)
	falsepart.Touched:connect(falsepressed)
	pgui:FindFirstChild("GameGui").Intermission.Text = table.concat(nametable, ' , ') .." won."-- problem here

1 comment

0

It would be very helpful to everyone looking at your code and yourself if you would indent your code. Indenting your code makes it easier to read and helps show errors before they even happen.