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

Having trouble with CharacterAppearanceLoaded. Help?

Asked by 6 years ago

So I created a script which gives players some localscripts everytime they spawn. I have been testing It for a while, and I realized after running it in client mode, It doesnt work with players without any clothes. I have been looking for information and I found out it is a roblox issue which has not been fixed yet.

Here's my script

01local Players = game:GetService("Players")
02 
03Players.PlayerAdded:Connect(function(player)
04    player.CharacterAppearanceLoaded:Connect(function(character)
05        setPlayer(character)
06    end)
07end)
08 
09function setPlayer(char)
10    for _,setting in pairs (script:GetChildren()) do
11        local c = setting:Clone()
12        c.Parent = char
13        if c.ClassName == "LocalScript" then
14            c.Disabled = false
15        end
16    end
17end

I just don't know what to do. I tried cloning the scripts into the players directly with "player.Character", but It doesnt work

0
PlayerAdded won't fire for the client running the local script. But if you're going to modify their character you might as well do it from the server. User#19524 175 — 6y
0
This code is in a Script, not LocalScript masterjosue1998 116 — 6y
0
local function onPlayerAdded(player) ?? ABK2017 406 — 6y

Answer this question