Hi, I have script which giving T-shirt (decal), but something is wrong here in 4 line. Exactly Players.DodusiakPL.PlayerGui.UniformGui.Frame.US.Ubranie.Script:4: attempt to index nil with 'Character' I don't have idea what's wrong, any ideas? (script written in LocalScript)
This is this script
local Decal = script.Parent:FindFirstChildOfClass("Decal")
script.Parent.MouseButton1Click:connect(function(Player)
local Character = Player.Character
for i,v in pairs(Character:GetDescendants()) do
if v:IsA("ShirtGraphic") then
v:Destroy()
end
end
local ShirtGraphic = Instance.new("ShirtGraphic")
ShirtGraphic.Graphic = Decal.Texture
ShirtGraphic.Parent = Character
end)

3 comments
Both not working
Then you are probably doing something not so right i guess, you should try to check roblox devforum as there is definitely answer for that,
I edited it sorry, i was wrong