I recently made my game FilteringEnabled. I have a character creation GUI in the beginning of the game when a player joins and it changes the characters face, shirt, pants, etc. Before Filtering, all players could see the changes done (shirts changing, pants changing, etc). But after Filtering, only the localplayer sees the items being changed on his/her character.
local player = game.Players.LocalPlayer
local Character = player.Character
if not Character or not Character.Parent then
Character = player.CharacterAdded:wait()
end
script.Parent.MouseButton1Down:connect(function()
local Head = Character.Head
local BodyColors = Character:FindFirstChild("Body Colors")
local Shirt = Character:FindFirstChild("Shirt")
local Pants = Character:FindFirstChild("Pants")
if Shirt then
Shirt.ShirtTemplate = "rbxassetid://629730174"
else
local Shirt = Instance.new("Shirt", Character)
Shirt.ShirtTemplate = "rbxassetid://629730174"
end
if Pants then
Pants.PantsTemplate = "rbxassetid://629736312"
else
local Pants = Instance.new("Pants", Character)
Pants.PantsTemplate = "rbxassetid://629736312"
end
for i,v in pairs(Character:GetChildren()) do
if v.ClassName == "Accessory" then
v:Destroy()
end
end
for i,v in pairs(Character:GetChildren()) do
if v.ClassName == "Hat" then
v:Destroy()
end
end
--local hat = game.ReplicatedStorage.NerdHair:Clone()
--hat.Parent = Character
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local WallyHat = ReplicatedStorage.Remote.WallyHat
WallyHat:FireServer()
Head.face.Texture = "rbxassetid://144763383"
BodyColors.RightArmColor = BrickColor.new("Reddish brown")
BodyColors.LeftArmColor = BrickColor.new("Reddish brown")
BodyColors.LeftLegColor = BrickColor.new("Reddish brown")
BodyColors.RightLegColor = BrickColor.new("Reddish brown")
BodyColors.TorsoColor = BrickColor.new("Reddish brown")
BodyColors.HeadColor = BrickColor.new("Reddish brown")
local c = Character:FindFirstChild("TheFlash")
if c then
c:Destroy()
end
Character.Zoom:Destroy()
Character.ReverseFlash:Destroy()
Character.BlackFlash:Destroy()
local t = game:GetService('UserInputService').TouchEnabled
if t == true then
player.PlayerGui.Teleport.Minus.Visible = true
player.PlayerGui.Teleport.Plus.Visible = true
player.PlayerGui.Teleport.Walkspeed.Visible = true
else
player.PlayerGui.ControlHUD.Frame.Visible = true
script.Parent.Parent.Parent.Parent:Destroy()
end
end)
I'm not sure but I think I would need to use a RemoteEvent and use FireAllClients(). Can someone point me in the right direction?
