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

How can I make it so only certain people get a hat and package when they join my game?

Asked by 10 years ago

How can I make it so only certain people get a hat and package when they join my game? For instance, if I want my friend to have the Dominus Messor and the Overseer package when he plays my games how would I do that?

1 answer

Log in to vote
0
Answered by 10 years ago

You could do something like this. I'm only going to give you the base of it so you can customize.

game.Players.PlayerAdded:connect(function(player)
ptable = {
    "Person1",
    "Person2"
}

if ptable[x] == player.Name then
    tool = game.ServerStorage.Tool
    toolclone = tool:Clone(player)
end

There's probably some mistakes but that's the base of it.

Another way (This goes in a localscript in the starterpack):

game.Players.PlayerAdded:conect(function()
    local player = game.Players.LocalPlayer
    if player.Name == "Name1" or player.Name == "Name2" then
        tool = game.ServerStorage.Tool
        toolclone = tool:Clone(player.Backpack)
end 
end)

The second way is probably more correct.

Hope I could help!

Ad

Answer this question