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

Expected identifier when parsing expression, got ')'??

This is my first time trying any code whatsoever so I'm really new to this. Where did I go wrong?

local TeleportService = game:GetService ("TeleportService")
local part = script.Parent
local debounce

debounce = false

	part.Touched:Connect (function(hit)

		if debounce == false then
		debounce = true

	local human = hit.Parent:FindFirstChild("Humanoid")

		
		if human then
			local char = hit.Parent
			

		local player = game.Players:GetPlayerFromCharacter(char)
			TeleportService:Teleport(gameID, player)

	wait(5)
	debounce = false
			
		end
end)

I'm really lost here.

1 answer

So, you're literally missing an end at the bottom.

So it would be like this:


local TeleportService = game:GetService ("TeleportService")
local part = script.Parent
local debounce

debounce = false

    part.Touched:Connect (function(hit)

        if debounce == false then
        debounce = true

    local human = hit.Parent:FindFirstChild("Humanoid")


        if human then
            local char = hit.Parent


        local player = game.Players:GetPlayerFromCharacter(char)
            TeleportService:Teleport(gameID, player)

    wait(5)
    debounce = false

		end
        end
end)

Don't need to copy and paste of course, just write down the extra end :/

3 comments

0

Oh, thanks!

0

No problem!

0

Now please mark this as solved. And you're good to go.

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