Hey! I have no clue how to do this! so let me explain I want to make it so only 1 team can click the block and when that team does it teleports to certain place.
You would need to do something similar to:
local part = script.Parent -- Defining the part the player clicks on local clickDetector = Instance.new("ClickDetector", part) -- Creating a ClickDetector inside the part local teleportToPosition = CFrame.new(10,1,1) -- Where the character teleport to clickDetector.MouseClick:connect(function(player) -- When player clicks the part if player.TeamColor == BrickColor.new("Really red") then -- Change "Really red" to the BrickColor value of the team you want to be able to teleport player.Character.HumanoidRootPart.CFrame = teleportToPosition -- Teleports player end end)
This script will check what team a player is on when they press the button and teleport that player if they are on the right team.
Hope this helps.