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

What is wrong with my script?

Asked by
Moosee 62
9 years ago
game.Players.PlayerAdded:connect(onPlayerRespawned)
function onPlayerRespawned(newPlayer)
wait(1)
local Person = newPlayer.Name
    if Person == "Player" then
        local shirt = Instance.new("Shirt")
        shirt.Parent = newPlayer.Character.Torso
        shirt.ShirtTemplate = "http://www.roblox.com/asset?id=77132660"
        print "Worked"
    end

end

function onPlayerEntered(newPlayer)
newPlayer.Changed:connect(function (property)

if (property == "Character") then
onPlayerRespawned(newPlayer)

end
end)
end
game.Players.PlayerAdded:connect(onPlayerEntered)

the script is supposed to give me a Lua Tee when I play, and it works because it prints Worked afterwards and gives me the ID in the character, but IDK what is going wrong, please help!

0
Nevermind I'm such a dumby! I made the parent hte torso!!! Moosee 62 — 9y

Answer this question