Team Name Teleport

Hello, I am making a script that runs forever to detect if a player ever goes into a certain team, I am trying also to make it teleport your HumanoidRootPart to a Named Brick but it doesn’t seem to work.

local teams = game:GetService("Teams")
local predTeam = teams.Predator
local predSpawn = workspace:WaitForChild("PredatorStart")

	local character = player.Character
	local hrp = character:WaitForChild("HumanoidRootPart")
	hrp.CFrame = predSpawn.CFrame 

A couple of issue, you shouldn’t really be using a while loop to achieve this, team instances have the “PlayerAdded” event which is fired whenever a player is added to the team, ChildAdded would work in a similar manner, the “CFrame” property is case sensitive and must be “CFrame”. You are attempting to assign the “Position” property which is a Vector3 value from an instance to the “CFrame” property which is a CFrame value of the HumanoidRootPart of the player’s character which isn’t possible, instead the CFrame property of the instance should be used.

1 Like

You my good sir, Are an avengers level threat. Thank you so much kindly :smiley: