I am trying to do this:
I want this script to ONLY run if you are wearing the hat, but the SCRIPT only runs for you WHEN YOU are WEARING the hat.
01 | function nvg(p) |
02 | p.CharacterAdded:connect( function (c) |
03 | Instance.new( 'SelectionBox' ,p.Character).Adornee = c |
04 | end ) |
05 | end |
06 |
07 | for _,p in next , game.Players:GetPlayers() do |
08 | Instance.new( 'SelectionBox' ,p.Character).Adornee = c |
09 | nvg(p) |
10 | end |
11 | game.Players.PlayerAdded:connect( function (p) |
12 | nvg(p) |
13 | end ) |
You'll probably need a loop so it always checks if the player has the hat.