I’m trying to make a script that equips a hat to the player via the item Id.
I’m currently stuck with getting GetHumanoidDescriptionByUserId() to function, every time I try I get this error: GetHumanoidDescriptionByUserId is not a valid member of Players “Players”
So far I’ve tried changing the Id from player.UserId to an Id that I know works, taken the line out of the loop, and I’ve changed game:GetService(“Players”) to game.Players. Anyone know why this isn’t working?
local Players = game:GetService("Players")
local ProximityPrompt = script.Parent
local ItemID = 12977807624
ProximityPrompt.Triggered:Connect(function(player)
local humanDesc = Players:GetHumanoidDescriptionByUserId(player.UserId)
humanDesc.HatAccessory = ItemID
game.Players.LocalPlayer.Character.Humanoid:ApplyDescription(humanDesc)
end)