Okay soo im trying to make a buyable skin but right now im just working on just making the skin apear on the character so when i click a button on a Frame it takes me to another frame then there is a TextButton called "Skins" if u click it I WANT it to make a the player who clicked it a CustomCharacter heres my script Please help!:
script.Parent.MouseButton1Click:Connect(function() game.ServerStorage.StarterCharacter:Clone() game.ServerStorage.StarterCharacter.Parent = game.StarterPlayer script.Parent.Parent.FrameSuccess.Visible = true end)
The only problem is that, if this is a local script, you're attempting to access ServerStorage
from the client, which isn't possible. ServerStorage
can only be accessed by regular scripts. Move the StarterCharacters
into ReplicatedStorage
and then follow this fix:
script.Parent.MouseButton1Click:Connect(function() local char = game.ReplicatedStorage.StarterCharacter:Clone() -- This creates an actual clone char.Parent = game.StarterPlayer script.Parent.Parent.FrameSuccess.Visible = true end)
(Can't believe I forgot that you have to set a clone to a variable, otherwise you're parenting the original StarterCharacter
. I put that in there.)
BEACUSE IT IS IN A GUI SOO do i just switch orrrrrr