I want the player to teleport to a plot when they join but for some reason the problem is that torso for some reason doesent exist please help. The game is in R6
You didnt wait for the Character of the player so it thinks its nil, so basically just wait for the Character like this
local character = player:WaitForChild("Character")
EDIT : If it worked mark me as a solution! @CoolSpaace
Never mind that does not work ,.
It says that now theres a infinite yield
Showing the full script will help me be bale to help you a bit more
Is the character r15 or r6 because torso does not exist in r15
Its saying whats he trying to index is nil
You have to use a chharacter added event, like so
player.CharacterAdded:Connect(function(character) -- end
Do humanoidrootpart, as thats on all players.
Thats not the problem, the problem is that he doesnt have acess to the character
From the first error, it seems like
Character does not exist.
If you’re working from a server script, you can try connecting to the
player.CharacterAdded event, https://developer.roblox.com/en-us/api-reference/event/Player/CharacterAdded.
I would highly recommend you to set the primary part’s CFrame (or the HumanoidRootPart) instead of any other part.
but if I do use character event how am I getting player
Just put the character added event inside of the player added event
From the game.Players.PlayerAdded event
I added it but now theres no errors and it still doesent tp the player
Show the code again but this time paste it in
local plot = script.Parent.Parent.Plot
local owned = false
if owned == false then
owned = true
plot.Name = player.Name…"'sPlot"
character.Torso.CFrame = CFrame.new(plot.Spawn.Position) + Vector3.new(0, 3, 0)
Do character.HumanoidRootPart.CFrame instead, its the main part AND all character types have it.