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

How Would I Make My ImageButton Make You My StarterCharacter?

Asked by 3 years ago
Edited 3 years ago

Please provide more explanation in your question. If you explain exactly what you are trying to accomplish, it will be much easier to answer your question correctly.

Hi. I want my ImageButton to make you my StarterCharacter, which is a BlockRig. In my menu, I have the ImageButton that when you press, I want it to spawn you as the StarterCharacter. I have some more StarterCharacters That are named differently, but I will script them to rename when I want you to spawn as one. For now, I have you spawn as your character in a black box. There is the menu that I made on screen. I tried making a script. Here is what it is.


local ServerStorage = game:GetService("ServerStorage") local StarterPlayer = game:GetService("StarterPlayer") local ImageButton = script.Parent ImageButton.MouseButton1Click:Connect(function() ServerStorage.StarterCharacter.Parent = StarterPlayer end)

I don't know what's wrong. Can anyone help?

Answer this question