As the title says, I want to make the hat be given and welded to the player when they join the game, Only if they’re in the group. I don’t have any code down since I’m completely unsure on how to do this. All help is appreciated
Well, I cannot script as well, but I have looked in the toolbox and I saw a Uniform Giver for group
Maybe replace the shirt and pants with an accessory and go from there?
EDIT: Links
From froast if you don’t wanna check
local groupId = 00
game.Players.ChildAdded:connect(function(player)
player.CharacterAdded:connect(function()
repeat wait() until player.Character
if player:GetRankInGroup(groupId) > 1 then
local hat = game.ServerStorage:WaitForChild("Hat")
local c = hat:Clone()
c.Parent = player.Character
end
end)
end)
Has ranks, but Im sure you can deal with that
Usually you would get a Item, and Position the Part with the Head
(This Example is with a ProximityPrompt)
Prompt.Triggered:Connect(function(p)
local W = Instance.new("Weld")
local A = Instance.new("Part", p.Character)
W.Part0 = p.Character.PrimaryPart
W.Part1 = A
A.Position = p.Character.PrimaryPart.Position + Vector3.new(0,2,0)
end)
Isn’t the best but still, it’s one way
I don’t know surely if this works, but
local YourGroupIDhere = 8585
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(chr)
if (player:IsInGroup(YourGroupIDhere)) then
-- // presumably you should put the hat in the script
script.Hat:Clone().Parent = chr
end
end)
end)
1 Like