The script is suppost to give the user when they join a nametag and if they respawn it gives them one too. It doesn't work I tried my best to solve it but it doesn't work. Can anyone solve it and fix it and give it to me thanks in advanced :D
Script:
local storage = game:GetService('ReplicatedStorage')
local event = storage:WaitForChild('PlayerEvent')
local playerse = game:GetService('Players')
local function onAdded(plr)
event:FireServer()
end
playerse.PlayerAdded:Connect(onAdded)
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
event:FireServer()
end)
end)
Local script:
local Storage = game:GetService('ReplicatedStorage')
local Event = Storage:WaitForChild('PlayerEvent')
local Light = game:GetService('Lighting')
local Tag = Light:WaitForChild('Name')
function onFired(plr)
local character = plr.Character
if not character or not character.Parent then
character = plr.CharacterAdded:wait()
local name = Tag:Clone()
name.Parent = character.Head
if game:GetService("MarketplaceService"):PlayerOwnsAsset(plr, 664864882) then
end
end
end
Event.OnServerEvent:Connect(onFired)

2 comments
Can you give me the fixed script version? I am still having some truoble
Also when I tried it says "OnClientEvent can only be used on the client" it comes from the main script not the local