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 6 years ago

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

0
???????????? User#20388 0 — 6y
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 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
local ids = {3252953,43583248965} --put ids in table here
local newSpawn = game.Workspace.VipSpawn --were you want them to spawn, make it a spawn location
game.Players.PlayerAdded:Connect(function(p)
    local isVip = false
    for i,v in pairs(ids) do
        if v==p.UserId then
            isVip = true
            break
        end
    end
    if isVip then
        p.RespawnLocation = newSpawn
        p.CharacterAdded:Connect(function(c)
            c:MoveTo(newSpawn.Position)
        end)
    end
end)

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