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

Teleporting script after wait(), it errors all the time?

So I did this expanding to my last question. It errors abotu this all the time, 3rd line. How can I fix it?

while true do
	wait(33.5)
	game.Workspace.Player.HumanoidRootPart.CFrame = CFrame.new(Vector3.new(-99, 4.5, -10))
	wait(180.9)
	game.Workspace.Player.Head:Destroy()
end

6 comments

0

About*, whoops

0

Sooooo 1) You could've edited your question. 2) We are not mind reading scripting helpers. 3) See this https://forum.scriptinghelpers.org/topic/191/how-to-use-cframe

0

(I'm Charnub btw lol hi) There are better ways to do this, Can you post the rest of the script?

0

You're looking in the workspace for the player's model called 'Player'?

1

If workspace.Player doesn't exist, it will error.

0

Workspace.Player likely isn't a real value unless you name all player characters 'Player'.

2 answers

✓ Accepted answer

Ok kid, you need some basics...

Workspace.Player huh?

That would only work if the player was NAMED Player XD.

So I am assuming you are doing this in a local script?

To get the players character, you do this:

game.Players.LocalPlayer.Character

replace all game.workspace.Player with the above code.

1 comment

0

Chill. Kid is a derogative term, if you are trying to act profession I would avoid using it. Maybe use his ROBLOX characters name.

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