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

How would you give uniform to player on join?

I created a script, but it has to be chatted. Any way to make it automatic on join? Also, how would you add hats?

1 answer

If you have the ids then it should be easy

local ShirtID = 'http://www.roblox.com/asset/?id=369695645'
local PantsID = 'http://www.roblox.com/asset/?id=419630782' --Put your ID's where the # is

game.Players.PlayerAdded:connect(function(Player)
    wait(3)
    local Shirt = workspace[Player.Name]:FindFirstChild('Shirt')
    if Shirt == nil then
        local ShirtObj = Instance.new('Shirt')
        ShirtObj.Parent = workspace[Player.Name]
        ShirtObj.Name = 'Shirt'
    end
    local Pants = workspace[Player.Name]:FindFirstChild('Pants')
    if Pants == nil then
        local PantsObj = Instance.new('Pants')
        PantsObj.Parent = workspace[Player.Name]
        PantsObj.Name = 'Pants'
    end
	workspace[Player.Name].Shirt.ShirtTemplate = ShirtID
	workspace[Player.Name].Pants.PantsTemplate = PantsID
end)

2 comments

0

Technically you are NOT supposed to let people give you scripts but eh. I'll let it slide ;)

0

I found a few errors, they've been corrected

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