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

how do I make a spawn for people ID only?

Asked by 7 years ago

how do I make a spawn for people ID only? like the peoplem I choose the ID

0
???????????? User#20388 0 — 7y
0
If you are asking about their user id I would recommend looking at this: https://wiki.roblox.com/index.php?title=API:Class/Player/UserId VeryDarkDev 47 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago
01local ids = {3252953,43583248965} --put ids in table here
02local newSpawn = game.Workspace.VipSpawn --were you want them to spawn, make it a spawn location
03game.Players.PlayerAdded:Connect(function(p)
04    local isVip = false
05    for i,v in pairs(ids) do
06        if v==p.UserId then
07            isVip = true
08            break
09        end
10    end
11    if isVip then
12        p.RespawnLocation = newSpawn
13        p.CharacterAdded:Connect(function(c)
14            c:MoveTo(newSpawn.Position)
15        end)
16    end
17end)

Put the id's of people you want to be accepted into the brackets, and make the newSpawn variable your spawn location. If you do the above correctly, anyone with a id in the table above will be teleported & spawn at the spawn location. If you have any questions, feel free to ask, until then, have a great day.

-REALTimothy0812

Ad

Answer this question