So I have a character select GUI and it fires a event and changes the character model I also want the GUI image to change. This is what I have so far.
local event = game.ReplicatedStorage["Choose Goku (S:2)"] event.OnServerEvent:Connect(function() script.Parent.Image = "rbxgameasset://Images/Goku Icon" end)
So I want the image to change after I receive that the event has fired.
I am new too scripting so any help would be great, thank you.
I have two solutions for this.
First one:
At this line you have to write the id of the image, not the name:
script.Parent.Image = "rbxgameasset://Images/Goku Icon"
I can't really help you with the Id, since there are many with the same name. :/
You would probably also have to reload the frame.
Hope this helped you understand roblox asset Id. :)
Second:
You can have another image, and then turn of the visibility of the other and turn on for that image.
script.Parent.Image1.Visibility = false -- Since it's a bool value. script.Parent.Image2.Visibility = true -- Other Image.
Hope one of these helped you. - Toby