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

How do you make a script that gives a specific object to a specific player?

Asked by 9 years ago

I've been looking up this question for ages now. I've even tries to script it myself. Honestly, I'm not the best at scripting, either. So, here's a scenario of what this script would do. Scipt: Only this person with this SPECIFIC username can get this tool( a sword for example).

Let's say that the username "Bill123" is inserted into the script. Only Bill123 would be able to spawn with this tool in his inventory, although "Hill123" wouldn't be able to spawn with the tool.

0
pretty easy, i wish i could answer it. for some reason all the easy ones pop up at night lolol unmiss 337 — 9y

1 answer

Log in to vote
0
Answered by
funyun 958 Moderation Voter
9 years ago
tool = nil
cooldudes = "Bill123, Hill123, Shedletsky, builderman"

game.Players.PlayerAdded:connect(

function(player)
    if string.find(cooldudes, player.name) then
        local toolclone = tool:Clone()
        toolclone.Parent = player.Backpack
    end
end

)
Ad

Answer this question