Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

How to Make Player change body on Entered?

Asked by 6 years ago

when player enters he/she spawns with package.

1 answer

Log in to vote
0
Answered by 6 years ago
function onPlayerChanged(property,player)
if property=="Character" and player.Character then

for i,v in pairs(player.Character:children()) do
if v:IsA("Shirt") or v:IsA("Pants") then
v:Remove()
end
end
-- Insert new clothes here

end
end

function onPlayerEntered(plyr)
plyr.Changed:connect(function(prop) onPlayerChanged(prop,plyr) end)
end

game:service("Players").PlayerAdded:connect(onPlayerEntered)
Ad

Answer this question