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

OnClick doesn't change Image?

Asked by 7 years ago

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)

1
1. Do you own the asset, 2. Are you sure the id is correct (try substracting 1 or 2 or 3 etc. #robloxlogic) RubenKan 3615 — 7y
0
I don't own the asset but subtracting 1 helped, Thanks! User#15916 -1 — 7y
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. :) TheeDeathCaster 2368 — 7y

1 answer

Log in to vote
1
Answered by
RubenKan 3615 Moderation Voter Administrator Community Moderator
7 years ago

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

Ad

Answer this question