local JJ = game.ReplicatedStorage.JJ function onEnter(player) end if (player).name == "Vividex" then do JJ.Parent = player end end
this is probably no wear near to close of what i thought pretty much suck at scripting i put the jj hat in replicatedstorage and made a function when i join it takes the hat and puts it on me probably not even close lol please help? i also am trying to make it repeat on death
Try this one:
local JJ = game.ReplicatedStorage.JJ game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) if player.Name == "Vividex" then JJ:Clone().Parent = player end end) end)
You wrote a function in a script and as what tutorial says, the function is useless without being triggered. You must just write onEnter()
for it to work.
The script I wrote has its event listener so that when the event occur, the function will too.