You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
When I press the UI I want to press, it changes the UIStroke color, but it does not do the task given.
What is the issue? Include screenshots / videos if possible!
It doesnt work, and considering I have tried other solutions, this isn’t something that I can solve.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I looked at other posts, but possibly I didnt look far enough.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local Top2 = script.Parent
local UIStroke
Top2.MouseButton1Click:Connect(function()
print("check 1")
Top2.UIStroke = Color3.fromRGB(92, 255, 83)
wait(.1)
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
Here’s also some of the reasons why this is happening:
It is actually working, but you are checking the StarterGui instead of PlayerGui. The library of the gui that shows up for the player is called PlayerGui and it is located inside the player instance.
You didn’t wait for the UIStroke instance using :WaitForChild().
Try to check your hierarchy once again. The error is saying that the UIStroke element isn’t actually parented under the Top2 instance.
From some experience, (could be wrong) it doesnt always need a filled variable, and what would need to go there? Also, where does one put the waitforchild