What's the problem why he can't find the CFrame?

what’s the problem please help i’m from yesterday trying to solve the problem
@lrd14 @Bruh_YourePro

1 Like

Could you also show a picture of your workspace in the explorer window?

2 Likes

From what I can tell, you don’t set RMASpawn if the half variable isn’t equal to 1, so in your for loop, you’re treating it as if it exists when it doesn’t, hence you get the “can’t index nil with CFrame” error

2 Likes

Screenshot 2022-12-27 114501
they are in the workspace so what’s the problem?

1 Like

Have you tried using HumanoidRootPart?

local hrp = character:FindFirstChild("HumanoidRootPart")
hrp.CFrame = RMASpawn.CFrame
2 Likes

image
When half is 1 you are setting RMAScore and BARScore instead of RMASpawn and BARSPawn.
Like DevAX1T said.

2 Likes

so i have to reverse it???
or what??

1 Like

omg i was dumb. thanks i’ll give you and him a solution

1 Like

can i ask you something else how can i make a lot of teleport not one like
Screenshot 2022-12-27 120754
this commands i want it to be like
RMASpawn = workspace.Team1Spawn, Team3Spawn, Team5Spawn, Team7Spawn
BARSpawn = workspace.Team2Spawn, Team3Spawn, Team6Spawn, Team8Spawn

but i need it work. so how? please reply fast.

1 Like

You can use the CollectionService to add tags

then do something like this

if half == 1 then
    RMASpawns = CollectionService:GetTagged("Team1Spawn")
    BARSpawns = CollectionService:GetTagged("Team2Spawn")
else
    RMASpawns = CollectionService:GetTagged("Team2Spawn")
    BARSpawns = CollectionService:GetTagged("Team1Spawn")
end

Then RMASpawns and BARSpawns are arrays of spawn positions

1 Like

so i do this ?
if half == 1 then
RMASpawns = CollectionService:GetTagged(“Team1Spawn”, “Team3Spawn”)
BARSpawns = CollectionService:GetTagged(“Team2Spawn”, “Team4Spawn”)
else
RMASpawns = CollectionService:GetTagged(“Team2Spawn”, “Team3Spawn”)
BARSpawns = CollectionService:GetTagged(“Team1Spawn”, “Team4Spawn”)
end

1 Like

No I mean that you give every spawn of team 1 the Team1Spawn tag and every spawn of team 2 the Team2Spawn tag.

1 Like

ok i understand now!! thanks!!

1 Like

CollectionService is not a thing

1 Like

game:GetService("CollectionService")

image
Then use the builtin tag editor to add tags to the spawns.

where i can find tag editor???
i found it

Screenshot 2022-12-27 125600
umm back to the main problem?!

This is a different issue. Spawns is now an array, you have to index a specific spawn from the list to be able to get it’s CFrame.

-- btw I'm pretty sure just setting the hrp's cframe doesn't work, so here is how I would do it
character:PivotTo( RMASpawns[math.random(#RMASpawns)].CFrame )


bruh.i’m done with this game.

Did you add the tags correctly? This happens because RMASpawns is an empty array. So CollectionService couldn’t find anything with the "Team1Spawn" tag