Hey,
I’m trying to make a Numpad like the Jailbreak casino one, but I just don’t know once you press a number, it’ll add that to a value and then display on the UI.
Any idea…?
local CodeFrame = script.Parent.CodeFrame
local Code = script.Parent.Values.Code
local Numbers = CodeFrame.Numbers
local CodeText = CodeFrame.CodeText
for _, v in pairs(Numbers:GetChildren()) do
if v.Name ~= "CLEAR" and v.Name ~= "ENTER" then
v.MouseButton1Click:Connect(function()
Code.Value += v.Name --Errorline which is not working.
end)
elseif v.Name == "CLEAR" or v.Name == "ENTER" then
v.MouseButton1Click:Connect(function()
if v.Name == "CLEAR" then
Code.Value = ""
elseif v.Name == "ENTER" then
if Code.Value == OfficialCode.Value then
print("Client: Success!")
end
end
end)
end
end
Code:GetPropertyChangedSignal("Value"):Connect(function()
CodeText.Text = Code.Value
end)
Thanks!