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

Why isn't this string working?

I've tried many things and I just want to get this GUI done. It's starting to annoy me >;l

apple = game.ServerStorage.Apple
number = game.StarterGui.ScreenGui.Number


function onClicked()
    local appleC = apple:Clone()
    appleC.Parent = game.Workspace
	local apples = tostring(number.Value.Value)
    number.Value.Value = number.Value.Value + 1
    number.Text = apples
	print("" .. apples)
    script.Parent.Parent:Destroy()
end

script.Parent.MouseClick:connect(onClicked)

So I changed it a bit and I added a print.. Here's something funny.. The print DOES work, so I tested if I could change the number.Text at all! And that was a no.. So I can't even change the text to something like poop..

2 comments

0

Are you getting any output?

0

No I'm not :p

1 answer

apple = game.ServerStorage.Apple
number = game.StarterGui.ScreenGui.Number


function onClicked()
    local appleC = apple:Clone()
    appleC.Parent = game.Workspace
    local apples = tostring(number.Value)
    apples.Value = apples.Value + 1
    number.Text = ("".. apples.Value)
    script.Parent.Parent:Destroy()

end

script.Parent.MouseClick:connect(onClicked)

1 comment

0

still didn't work :p. I even modified it a bit and it didn't work

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