Simple way to do it is GetChildren on the players character, if the child is a Part, MeshPart or then set the transparency to 1. The clone your soccer ball to the same Position as the characters HumanoidRootPart.
Would you use āpairsā or āipairsā for something like this? not sure if I am understanding how those work exactly but i think it would something loop through the GetChildren and if I = Part then set transparency to 1
This depends on the effect you want. Do you want it to just look like a soccer ball or actually be a soccer ball?
If itās the former then you can just weld a soccer ball model to the character and turn the existing character transparent. If itās the latter then:
To loop through the character, I use the following:
-- Assuming "character" is the player character you are modifying
for _, child in ipairs(character:GetChildren()) do -- Loop thru character Children
if part:IsA("Part") or part:IsA("MeshPart") then -- Check if Child is a Part or a Mesh
-- Do stuff to the character parts
part.CanCollide = false
part.Transparency = 1
end
end