I want to know how I can change the text and mesh texture onclick? like for example the left button does "-1" and the right does "+1"
local gift = script.Parent.Parent.Gift
local mesh = gift.Mesh
local right = script.Parent.Parent.Right
local click = right.ClickDetector
local text = script.Parent.Parent.InformationBlock
infotext = text.InfoGui.InfoText.Parent
local id = "rbxassetid://"
local sn = 1
texture = {189783253,189748284}
function onClicked()
sn = sn + 1
if sn > #texture then sn = 1 end
mesh.TextureId = id..texture[sn]
while wait() do
for i=1,#texture do
print(i) -- test what shows up
if i == 1 then
text.InfoGui.InfoText.Text = "Gift 1"
print("Gift1")
elseif i == 2 then
text.InfoGui.InfoText.Text = "Gift 2"
print("Gift2")
end
end
end
end
The text thing only works once, if it's possible.

2 comments
Use two scripts, one that changes it when left is touched, and one for right. You dont need to over complicate it.
That's what I did.