Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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.

1 comment

0

pretty easy, i wish i could answer it. for some reason all the easy ones pop up at night lolol

1 answer

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

)

This discussion is preserved as it was. New answers, comments, and votes are closed.