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

Why can't other players see a players shirt?

Asked by 9 years ago

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)
0
It's probally because you have it on a Localscript. rexbit 707 — 9y
0
Have the shirt/pants template been approved by Roblox yet? magiccube3 115 — 9y

1 answer

Log in to vote
0
Answered by
1waffle1 2908 Trusted Badge of Merit Moderation Voter Community Moderator
9 years ago

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.

0
It is not on. Relampago1204 73 — 9y
Ad

Answer this question