Sorry for posting so often, but whenever I try my script that changes a player's skin color I get this error Players.UNBANhappyniceguy5.PlayerGui.Skin Color:5: attempt to index local 'acplayer' (a nil value)
local player = script.Parent.Parent local acplayer = game.Workspace:FindFirstChild(player) wait(1) acplayer['Body Colors'].HeadColor = BrickColor.new('Pastel brown')
It looks like you're using a serverscript. Try doing this if your game is filtering enabled:
1. add a RemoteEvent
to game.ReplicatedStorage
and call it ColorEvent
add a localscript on the starter gui
add a serverscript on the workspace
in the localscript add this
game.ReplicatedStorage.ColorEvent:FireServer()
game.ReplicatedStorage.ColorEvent.OnServerEvent:Connect(function(acplayer) acplayer.Character['Body Colors'].HeadColor = BrickColor.new('Pastel brown') -- You forgot to put in "Character"! end)
If your game is experimental mode (I don't recommend) then just turn the script into a LocalScript.
Also if you didn't know ServerScript = a normal script
For more info on roblox wiki visit this: https://wiki.roblox.com/index.php?title=API:Class/Workspace/FilteringEnabled