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

How do you add a spectate button?

In lots of games you can spectate people. And In my game "Cake-tastrophe" I would like the person to spectate. I also need a scripter for the game. That would be cool. Thank you!

1 answer

local part=PARTLOCATIONHERE --Change to where the part is where you want it to tp to
local d=false --Debounce
script.Parent.Touched:connect(function(part) --Calls event when touched
	if d then return end --Checks debounce
	d=true --Debounce
	if part.Parent:FindFirstChild("Humanoid") then --Finds a Humanoid if there is one
		part.Parent:MoveTo(part.Position) --tps character to part
	end
	d=false --Debounce
end)

If you want it to teleport when a player clicks it then edit the code

1 comment

0

He said spectate, not teleport.

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