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.
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 :/