I don't understand why the ShirtTemplate/PantTemplate could only be seen by one player not other players. It is the same for other players they can see their shirt and pants but not anyone elses. I have tried filteringenabled but that does nothing D:
local player=game.Players.LocalPlayer script.Parent.MouseButton1Down:connect(function() if player.Character:findFirstChild("Shirt") then player.Character.Shirt.ShirtTemplate="http://www.roblox.com/asset/?id=202704957" else local s = Instance.new("Shirt", player.Character) s.ShirtTemplate="http://www.roblox.com/asset/?id=202704957" end if player.Character:findFirstChild("Pants") then player.Character.Pants.PantsTemplate="http://www.roblox.com/asset/?id=204058688" else local p = Instance.new("Pants", player.Character) player.Character.Pants.PantsTemplate="http://www.roblox.com/asset/?id=204058688" end end)
It is because you turned on FilteringEnabled. If the client makes a change to the server while FilteringEnabled is on, it will not replicate. The solution is to signal the server to make this change, or to turn off FilteringEnabled.
On line 17, player.Character.Pants is not correct; the default name of a new Pants instance is "Clothing" (as well as for shirts) so you should reference the variablep
like you did s
for the Shirt.