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

Changing character appearance (FE)?

I'm trying to change a player's appearance to a user on ROBLOX when they join. Before I used Filtering, the script was only in ServerScriptService and it worked fine. It was like 3 lines of code. But now, other players will not see the change of character because of Filtering. I attempted to use RemoteEvents to fix this (I just started using FE).

LocalScript in StarterGui

local ReplicatedStorage = game:GetService("ReplicatedStorage")
 
local playerJoin = ReplicatedStorage.Remote.Character
 
local function onJoin()
	local players = game:GetService("Players")
	local player = players.LocalPlayer
	player.CharacterAppearance = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId=182917612" 
end
 
playerJoin.OnClientEvent:Connect(onJoin)

Script in ServerScriptService

local Players = game:GetService("Players")
 
local playerJoin = ReplicatedStorage.Remote.Character
 
local function onPlayerAdded(player)
	playerJoin:FireClient(player)
end
 
Players.PlayerAdded:Connect(onPlayerAdded)

1 answer

✓ Accepted answer

If the game is filteringenabled, you can't change the character appearance from a local script.

FilteringEnabled was made to prevent changes like that happening locally.

Use the following code in a server script in ServerScriptService


local Players = game:GetService("Players")
 
function onPlayerAdded(player)
    player.CharacterAppearance = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId=182917612"
end
 
Players.PlayerAdded:connect(onPlayerAdded)

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