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

How to make : Image change by button click ?

Asked by
PPJASK 19
3 years ago
Edited 3 years ago

Hello, I have a question about the script How to - How to make Image change by button click script ?

Thank you for all the answers

  • Thanks and best regards -PPJASK

1 answer

Log in to vote
0
Answered by 3 years ago

Hello

To make it work, insert a ScreenGUI in StarterGUI, Then insert an ImageLabel in StarterGUI

Heres a script for what you needed for:

local button = script.Parent

local tagret = game.StarterGUI.ScreenGUI.ImageLabel


button.MouseButton1Click:Connect(function()
       target.Image = "rbxassetid://5015860984"
end)

Hope it help's!

0
when you defined tagret, it was spelt incorrectly in line 7. Ponytails2017 83 — 3y
0
Yeah, I didn't notice. RektwayYTB 123 — 1y
Ad

Answer this question