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

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

Asked by 8 years ago
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

Log in to vote
0
Answered by 8 years ago

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)
0
That script didn't fix it, it this a error on roblox? XxmanwolfxX2 25 — 8y
0
No, it's an error in your logic. Check your hierarchy PlsNoDiscrimination 0 — 8y
Ad

Answer this question