of     1   

drefus
#214189435Wednesday, April 12, 2017 10:51 PM GMT

local player = game.Players.LocalPlayer local char = player.Character Output says: Workspace.Charcter:2: attempt to index local 'player' (a nil value)
AlphaOverflow
#214189573Wednesday, April 12, 2017 10:53 PM GMT

Is this in a LocalScript in StarterPlayerScripts or StarterGUI or StarterPack?
ScriptBased
#214192511Wednesday, April 12, 2017 11:34 PM GMT

Add wait() in the beginning of you code before you start defining stuff
drefus
#214227094Thursday, April 13, 2017 9:42 AM GMT

IT is a script in workspace and would it be like local player = game.Players.LocalPlayer wait() local char = player.Character
LaeMVP
#214227776Thursday, April 13, 2017 10:00 AM GMT

You can't get localplayer from a serverscript
JoshRBX
#214228839Thursday, April 13, 2017 10:42 AM GMT

Use a LocalScript. Place it inside the player, so in StarterGUI for example.
drefus
#214228944Thursday, April 13, 2017 10:45 AM GMT

Why not playercharcterscripts
drefus
#214240883Thursday, April 13, 2017 3:22 PM GMT

This is my script and it is a local script which is in starterplayerscripts but it dose nothing and the output dosen't say anything local player = game.Players.LocalPlayer game.Players.PlayerAdded:connect(function(player) local pants = player.Character:FindFirstChild("Pants") if pants ~= nil then pants:Remove() local clon = script.Parent:FindFirstChild("Pants"):Clone() clon.Parent = player.Character local shirt = player.Character:FindFirstChild("Shirt") if shirt ~= nil then shirt:Remove() local clon = script.Parent:FindFirstChild("Shirt"):Clone() clon.Parent = player.Character local color = player.Character:FindFirstChild("BodyColors") if color ~= nil then color:Remove() local clon = script.Parent:FindFirstChild("BodyColors"):Clone() clon.Parent = player.Character end end end end)
drefus
#214247768Thursday, April 13, 2017 5:16 PM GMT

bump
Jric0
#214251963Thursday, April 13, 2017 6:15 PM GMT

the character is in the workspace, where the shirt/pants would be if i'm right defining the CHARACTER rather than the player would be game.Players.PlayerAdded:connect(function(player) local char = game.Workspace:WaitForChild(player.Name) --stuff here end) i might be wrong,¯\_(ツ)_/¯ good luck. Jrico253 → iiJricoo → Jric0
Jric0
#214252150Thursday, April 13, 2017 6:18 PM GMT

also, don't use that in a LocalScript or the clothes are only gonna be modified on the client's end and normal clothing will still look like normal on other people's screens. Jrico253 → iiJricoo → Jric0
JoshRBX
#214255617Thursday, April 13, 2017 7:28 PM GMT

If you haven't rewritten the error in the output, I'd like to make you aware of the fact that Character is spelled inorrectly.
drefus
#214268027Thursday, April 13, 2017 10:42 PM GMT

It is a 1 player game and should the code look like this game.Players.PlayerAdded:connect(function(player) local char = game.Workspace:WaitForChild(player.Name) local pants = char:FindFirstChild("Pants") if pants ~= nil then pants:Remove() local clon = script.Parent:FindFirstChild("Pants"):Clone() clon.Parent = char local shirt = char:FindFirstChild("Shirt") if shirt ~= nil then shirt:Remove() local clon = script.Parent:FindFirstChild("Shirt"):Clone() clon.Parent = char local color = char:FindFirstChild("BodyColors") if color ~= nil then color:Remove() local clon = script.Parent:FindFirstChild("BodyColors"):Clone() clon.Parent = char end end end end)
Jric0
#214280024Friday, April 14, 2017 1:27 AM GMT

looks fine to me. Jrico253 → iiJricoo → Jric0
drefus
#214318115Friday, April 14, 2017 2:18 PM GMT

It wont work idk why

    of     1