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

Broken Spawning script?

Asked by 10 years ago
local SpawnPoints = {, 13.9, -65.9),, 42.9, 22.5),, 37.3, -119.7),, 6.9, -159.5),, 5.5, -128.3),, 6.3, 60.9),, 5.7, 56.1),, 5.1, 17.9),, 5.1, -82.5),, 29.1, -109.3),, 5.7, 54.5),, 5.3, -144.5)}

function teleportrandom()

It won't work and I tried Players.Character and THAT only works in the Testing not the actually ROBLOX server... I am really lost right now.

2 answers

Log in to vote
Answered by 10 years ago

1) There is no end statement for your function 2) Put it in a Localscript, then use at line 5:

It would be game.Players.LocalPlayer.Character Thewsomeguy 448 — 10y
Oh sorry, editing Hippalectryon 3 — 10y
Log in to vote
Answered by
adark 5487 Badge of Merit Moderation Voter Community Moderator
10 years ago

Two questions: 1) Is this a local script? 2) Where, exactly, is this script located?

I ask the first, because if this is all of the code (which it obviously isn't, but whatever), you will be able to make this a local script without anything breaking, which may solve your problem. If it already is a local script, making it a script could also fix it.

I ask the second for more context if what I said above doesn't work.

What you can try is teleporting by setting the Torso's CFrame rather than calling MoveTo() on the Character's Model. I find that MoveTo() is unreliable for some reason whenever I try to use it for teleportation.

Answer this question