Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to Make Player change body on Entered?

when player enters he/she spawns with package.

1 answer

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)

This discussion is preserved as it was. New answers, comments, and votes are closed.