Adding starter___ scripts when GUI clicked

I’m making a game where if a character is selected it provides you with their designated attacks, but I don’t know how to make it so if the GUI is clicked a folder of scripts and remote events is added into the players starterplayer/pack/gui. I’m also unsure on how to make it so if a different character is clicked while they already are one it removes those folders from them then refreshes the player and then morphs them into the new character while also giving them the new scripts.

2 Likes

If you show the current problem with screen shots we might have a more clear understanding so we can help you out.

Lets say I have a folder as Melee1’s parent, how would I make it so when a gui is clicked these scripts are activated?
image

I would use Disabled property (worked for me)

How about if another gui is clicked, how would i make it so it disables that script again and enables the next one clicked?

You can make the Disabled property to true then false and repeat
like this

local Script = script.Parent.Script -- location for script here

if Script.Disabled == true then
    Script.Disabled = false
else
    Script.Disabled = true
end

(use MouseButton1Click event to check if the button was clicked)

You could make it short.

Script.Disabled = not Script.Disabled

Try using the Instance.new Function