Hi, I’m wondering how I could make it so you can click an ImageButton that changes another ImageLabel to an image, and also changes a String Value (Such as if you click BuildingTools, it changes the image to BuildingTools and also changes the Value to BuildingTools).
So far I already tried this and it worked for one image only, but it froze my studio! I asked one of my friends, and he was pretty confused! (even though he was an advanced scripter).
The freezing of Roblox Studio probably isn’t related to this. You could use a RemoteEvent. Have it such that when the button is clicked, you fire the event. Something like:
local RPS = game:GetService("ReplicatedStorage")
local Remote = RPS:WaitForChild("NAME_OF_YOUR_EVENT")
script.Parent.MouseButton1Click:Connect(function()
Remote:FireServer(info) --Define info, if you need to pass information over to the server, for example the player's name.
end)
Then have a server script, that looks something like this:
local RPS = game:GetService("ReplicatedStorage")
local Remote = RPS:WaitForChild("NAME_OF_YOUR_EVENT")
Remote.OnServerEvent:Connect(function(player,info) --The first parameter will be the player who fired it, and the second one would be the first parameter of the LocalScript.
game.Workspace.Part.ImageLabel.Image = info --That is if the info is the TextureId, if not just replace it with anything else you want.
end)
Yeah that’s what I’m saying. The infinite yield is waiting for an item called “BuildingTools” while the actual name is BuildingToolsOne. What is confusing is that in the scripts he provided, they are called correctly. Unless there is more that we are not seeing. Not too sure about this.