Code is below please help lol
Player = game.Players.LocalPlayer.Character function click() Player.Shirt.ShirtTemplate = 7195910588 end script.Parent.MouseButton1Click:connect(function() click() end)
also output Players.Kantruzt.PlayerGui.AdminThing.ShirtChanger.Frame1.Shirt6.Script:1: attempt to index nil with 'Character'
Problem:
Character isn't defined.
Description:
When the game runs, the Player and CharacterModel get inserted into the game. You CANNOT access anything from the character if you don't reference it
Solution:
:WaitForChild
, as the instance, might not be in the game yet.Recommendations:
When connecting an event to a function, :Connect
should be capitalised, as :connect is deprecated.
Fixed Script:
Player = game.Players.LocalPlayer local character = Player.Character or Player.CharacterAdded:Wait() function click() character:WaitForChild("Shirt").ShirtTemplate = "http://www.roblox.com/asset/?id=7195910588" end script.Parent.MouseButton1Click:Connect(click)
hey there. so in order to make the image of the clothing load, you have to put "rbxassetid://" before the numbers; when you manually insert the numbers it puts it there for you, but when you do it through a script, you have to say "rbxassetid://" before the numbers
so for your shirt you would say "rbxassetid://7195910588" as the id
in your script it would look like this
Player.Shirt.ShirtTemplate = "rbxassetid://7195910588"
i've tested this on my own shirt and it works for me