This script works fine when I test it in ROBLOX Studio but when I go on roblox it does not work. Why?

local number = 0
script.Parent.MouseButton1Click:connect(function()
script.Parent.Parent.TextBox.Text = "".. number
end)

If I got some mistakes you get the point. IT WORKS FINE IN STUDIO... but not in Roblox. Why? I saved and uploaded the file to the game but it still does not work on ROBLOX. Why?

2 comments

1

is it a local script?

1

No. I will try that