Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

CustomCharacter Selecter is not working?

Asked by 5 years ago

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)
0
1. put them in ReplicatedStorage not ServerStorage DeceptiveCaster 3761 — 5y
0
In fact, if this script is local, then that is exactly what your problem is. DeceptiveCaster 3761 — 5y

2 answers

Log in to vote
0
Answered by 5 years ago

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.)

0
ServerStorage is definitely accessible to clients. They just can't see the contents. User#24403 69 — 5y
0
still, that's why his script doesn't work DeceptiveCaster 3761 — 5y
0
thx u bro legendarycoos11 1 — 5y
0
NO NO NO It did not work my same avatar is the same legendarycoos11 1 — 5y
View all comments (3 more)
0
ok I think that you have to put it as a child of startercharacter in starterplayer DeceptiveCaster 3761 — 5y
0
?? LIKE NO ERRRORS BUUT Once i click it my new character is not showed up and if i reset it wont show up ether legendarycoos11 1 — 5y
0
Can i just firend u and u can figure it out somehow maybe man beacuse this is not working out i put time into this u know legendarycoos11 1 — 5y
Ad
Log in to vote
0
Answered by 5 years ago

BEACUSE IT IS IN A GUI SOO do i just switch orrrrrr

0
yes, put it in replicatedstorage and clone it to starterplayer.startercharacter DeceptiveCaster 3761 — 5y

Answer this question