Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why won't the do command work for my fighting game?

Here is my script:

local seconds = game.Workspace.Time
local ingame = game.Workspace.InGame.Value
local Game = game.Workspace.Game.Position


while true do

	wait(1)
	seconds.Value = seconds.Value - 1

	if seconds.Value == 0 and ingame == 0 then

		ingame = 1
		seconds.Value = 20

		local teleport = game.Players:GetChildren()
		for i = 1, #teleport? do
			teleport[i].Character:MoveTo(Vector3.new(Game.X, Game.Y, Game.Z))

		end
	end

	if seconds.Value == 0 and ingame == 1 then

		ingame = 0
		seconds.Value = 15

		local teleport = game.Players:GetChildren()
		for i = 1, #teleport? do
			teleport[i]:LoadCharacter()

		end
	end


end

And this is the error: Workspace.Script:17: Expected 'do' when parsing for loop, got Unicode character U+200b

Please help me.

1 answer

✓ Accepted answer

You need to remove the question mark after teleport on line 17:

for i = 1, #teleport do

1 comment

0

Do you mean the # sign?

This discussion is preserved as it was. New answers, comments, and votes are closed.