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

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

Asked by 6 years ago

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

0
About*, whoops ItzFireable 17 — 6y
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 hiimgoodpack 2009 — 6y
0
(I'm Charnub btw lol hi) There are better ways to do this, Can you post the rest of the script? IfIWasntSoSwag 98 — 6y
0
You're looking in the workspace for the player's model called 'Player'? awfulszn 394 — 6y
View all comments (2 more)
1
If `workspace.Player` doesn't exist, it will error. Goulstem 8144 — 6y
0
Workspace.Player likely isn't a real value unless you name all player characters 'Player'. Viking359 161 — 6y

2 answers

Log in to vote
0
Answered by 6 years ago

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.

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. GottaHaveAFunTime 218 — 6y
Ad
Log in to vote
0
Answered by 6 years ago

I created a teleport script a while back. Although mine activates after clicking a GUI.

Heres the link to my previous question that is sorta like yours.

https://scriptinghelpers.org/questions/45524/converting-a-teleport-script-into-a-clickable-gui

Answer this question