I tried this
local mouse = game.Players.LocalPlayer:GetMouse()
local function msg(t)
print("Confirmed"..t)
end
script.Parent.InputBegan:Connect(function()
msg("inputbegan")
local clickable = true
mouse.Button1Down:Connect(function()
msg("btndown")
if clickable == true then
local clicked = true
end
end)
mouse.KeyDown:Connect(function(key)
msg("spacedown")
if key == Enum.KeyCode.KeypadEnter and clickable == true then
msg("main")
script.Parent.Text = ""
end
end)
end)
The confirmed and the msg() function is for testing purposes. All help Appreciated

1 comment
Don't use PlayerMouse for keyboard input. https://developer.roblox.com/en-us/api-reference/class/UserInputService