I created a keypad in ro studio and it worked fine but when I tested it in a roblox server it didn't work, just a note I am using surface GUIs and my game is filtering enabled.
script for button 1:
local text = script.Parent.Parent.Parent.Parent.screen.Gui.Top.TextLabel local debounce = false script.Parent.MouseButton1Down:connect(function() if debounce == false then debounce = true local num = script.Parent.Name text.Text = text.Text..num debounce = false end end)
The script is inside a surface gui and the game is filtering enabled but when I turn filtering enabled off it works perfectly fine.
Thank you in advance
local text = script.Parent.Parent.Parent.Parent.screen.Gui.Top.TextLabel local debounce = false script.Parent.MouseButton1Down:connect(function() if debounce == false then debounce = true local num = script.Parent.Name --This is the line I changed text.Text = text.Text..num debounce = false end end)
So you did script.Parent.MouseButton1Down, so my understanding is that it is some type of button. And on the line that I indicated above, you put 'tostring(script.Parent)' which means you are trying to turn an object into a script, which isn't possible. I think you meant to put 'tostring(script.Parent.Name)', which gets the name (a string) of the object. But since you are using a name, it is already a string so no need to do 'tostring()'. Hope I helped!