Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Script wont change my gui's text or the image?

while true do
wait()

script.Parent.MouseButton1Click:connect(function()

if script.Parent.Parent.Texture.Value >= 1 then
script.Parent.Parent.Texture.Value = script.Parent.Parent.Texture.Value - 1
else script.Parent.Parent.Texture.Value = 10


end

It is a LocalScript the hierarchy goes like this Load/NewGame By XxmanwolfxX > ResetSave > Eyebrow Choose > Last > LocalScript

When I go to test it, the button wont change the gui's actions at all.

1 answer

while true don't

You're listening for an event; you don't need a giant infinite loop waiting to crash your game.

script.Parent.MouseButton1Click:connect(function()
if script.Parent.Parent.Texture.Value >= 1 then
script.Parent.Parent.Texture.Value = script.Parent.Parent.Texture.Value - 1
else 
script.Parent.Parent.Texture.Value = 10
end
end)

2 comments

0

That script didn't fix it, it this a error on roblox?

0

No, it's an error in your logic. Check your hierarchy

This discussion is preserved as it was. New answers, comments, and votes are closed.