I need to be able to make a gamepass give the player a hat whenever they join, and put it automatically put it on their back (it's a swordpack)
COMMUNITY QUESTION
How do you make a gamepass give a hat?
1 answer
See if this script can help you.
GamePassId = --YourGamePassId
game.Players.PlayerAdded:connect(function(Player)
Player.CharacterAdded:connect(function()
if game:GetService("GamePassService"):PlayerHasPass(Player, GamePassId) then
x = game.ServerStorage.YourBackSwords:Clone() --Save your "Swords" there <---
x.Parent = Player.Character
m = Instance.new("Motor6D", Player.Character.Head)
m.Part0 = Player.Character.Head
m.Part1 = x
m.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) *CFrame.new(0, 0, 0) --Play with the Position and Rotation of the Part
end
end)
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
