Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Why wont this r15 allowing teleportation script work!?

Asked by
Kenley67 -12
7 years ago

local availableSpawns = {} for i,v in pairs(game.Workspace.Spawns:GetChildren()) do table.insert(availableSpawns, v) end for i,v in pairs(game.Workspace.Spawns:GetChildren()) do v.Taken.Changed:connect(function() if v.Taken.Value == true then table.remove(availableSpawns, v) else table.insert(availableSpawns, v) end end) end game.Players.PlayerAdded:connect(function(plr) repeat wait() until plr and plr.Character local spawn = availableSpawns[math.random(1, #availableSpawns)] local Torso = plr.Character.UpperTorso or plr.Character.Torso Torso.CFrame = CFrame.new(spawn.Position) spawn.Taken.Value = true end)

it checks uppertorso then leaves so when I test with r15 it works but when I test with r6 it doesnt

2 answers

Log in to vote
1
Answered by 7 years ago
Edited 7 years ago

Why don't you get the model of the player and get the primary part because what I was told r15 does not always the exact resources.

Ad
Log in to vote
0
Answered by
RubenKan 3615 Moderation Voter Administrator Community Moderator
7 years ago

Use Player.Character.HumanoidRootPart instead. Not much i can add to this.

Answer this question