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

Player won't look the same on others computer?

local player = game.Players.LocalPlayer
local color = BrickColor.new('Pastel brown')

script.Parent.MouseButton1Down:connect(function()
    if player.Character then
        for i,v in pairs(player.Character:GetChildren()) do
            if v:IsA('BasePart') then v.BrickColor = color end
        end
    end
end)

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)

The point of this script is to change the appearance of a player. That works but one small problem. The players shirt and pants change but only on the players computer. So player2 or another person playing can only see their skin color change but the pants and the shirt would not change. I am sorry but this is really hard to explain.

1 comment

0

Local script?

1 answer

✓ Accepted answer

IF FILTERINGENABLED IS ON, HOW DARE YOU, TURN IT OFF

This is probably due to the fact that you're changing the localplayer's shirt though a localscript. that screams client manipulation at you lol. Try either using a server script, or preferably try to change the player's shirt by accessing the shirt from the workspace.

example;

local plr = game.Players.LocalPlayer
local shirt = workspace[plr.Name].Shirt

1 comment

0

FILTERINGENABLED IS ON. I am so confused

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