Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why does this spawn script not work, i`m very bad when it comes to position?

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:connect(function(char)
		if char then
			char.HumanoidRootPart.CFrame = CFrame.new(38.552, 0.5, 119.404)
			print('Worked')
		end
		
	end)

Basically i want the player when it spawns to teleport automatically to a part, it still goes weird.

4 comments

0

BTW, it prints worked too, but my player still doesn`t teleport at all.

0

What i do, is just place a block, turn off its can collide and make it transparent. put that block wherever you want the player to be teleported. and be like: char.HumanoidRootPart.Position = block.Position

0

i FIND my idea more organized because if you move your map around, and maybe you want em to spawn somewhere else, all u gotta do is move that block lol

0

It`s still not working

2 answers

✓ Accepted answer

runservice works for me whenever i try any of this

local svrun = game:GetService("RunService")
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
svrun.Stepped:Wait()
if char then
local root = char:WaitForChild("HumanoidRootPart")
root.CFrame = CFrame.new(38.552, 0.5, 119.404)
print('Worked')
end
end)

Can't you just use a spawn location from the toolbox? And just make it transparent and cancollide = true aswell as deleting the decal will make it compeletly invisible aswell as teleporting the player when they join.

1 comment

0

I want to make checkpoints for an obby, and i thought i could make a system that if player has stage 2 then when he joins the game he teleports at the part that require stage 2, i hope you understand what im saying, and the script from the other guy that commented doesnt work when i join ,idk why

This discussion is preserved as it was. New answers, comments, and votes are closed.