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

2 answers

Log in to vote
0
Answered by 7 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 — 7y
Ad
Log in to vote
0
Answered by 7 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