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

OnClick doesn't change Image?

There's no errors in the developer console, and this is supposed to work but ROBLOX doesn't allow it.

FilteringEnabled is not enabled and there is no events/remote events

script.Parent.MouseButton1Click:connect(function()
    script.Parent.Parent.Parent.ProductImage.Image = "http://www.roblox.com/asset/?id=23534055"
    script.Parent.Parent.Parent.TextBox.Text = "Jump higher than never before!"
end)

3 comments

1
  1. Do you own the asset, 2. Are you sure the id is correct (try substracting 1 or 2 or 3 etc. #robloxlogic)
0

I don't own the asset but subtracting 1 helped, Thanks!

0

I would not recommend so many 'script.Parent' usages (especially line 2-3); why not use a variable for that, instead of re-typing? It's much more efficient & makes your code look cleaner. :)

1 answer

-since my comment solved the problem i suggest accepting this answer to close the question ;)

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