Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I force all players to wear a custom hat?

Asked by 6 years ago

I want to test the new Valk to see if I want to buy it, but i cant do it without forcing players to wear it. So I don't have to put it down and walk to it. I have no previous code! Thanks for your time!

0
just teleport the hat to the players face greatneil80 2647 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

This is not a request site, but here it is anyways. This doesn't remove your hat, it just adds the hat handle onto your head. Copy/Paste this into a script and just put it into workspace via the explorer.

game.Players.PlayerAdded:connect(function(player) -- This adds the hat.
    repeat wait(0)until player.Character
    local hatId = 0 -- Replace this with the ID of your valk.
    local hat = game:service("InsertService"):LoadAsset(hatId):GetChildren()[1]
    hat.Parent = player.Character
end)
Ad

Answer this question