So basically I made a microwave timer, and you can put any time that you want and at most 4 numbers long, and no other characters except numbers. How you put in the amount of time you desire, is by just clicking on the textbox and typing any number you want. And when you’re typing the input should show on the textbox.
But the problem here is that on mobile is a bit different, because I went on my phone to test it out and it looks something along the lines like this
if you look at the red circle, it doesn’t show up on the text box but instead of this
I recorded it on my phone
but I want it to look like this
this is what I showed in studios, not on my phone
So basically what I want is the text to properly show the input in the textbox for mobile,
not on the screen of the device. It works perfectly fine for pc, but not for mobile
yeah here’s the script, im not sure how to fix it
script is under the textbox, and textbox is under surfacegui in the startergui cause workspace doens’t work
local Players = game:GetService(“Players”)
local ReplicateStorage = game:GetService(“ReplicatedStorage”)
local MicrowaveEvents = ReplicateStorage:FindFirstChild(“MicrowaveEvents”)
local ChangeTimeEvent = MicrowaveEvents:FindFirstChild(“ChangeTimeEvent”)
local DisplayTimeEvent = MicrowaveEvents:FindFirstChild(“DisplayTimeEvent”)
local surface = script:FindFirstAncestorOfClass(“SurfaceGui”)
local microwave = surface.Adornee.Parent
local textbox = surface:WaitForChild(“TextBox”)
local text
local display
local function display()
if textbox:IsFocused() == true then return end
local Time = microwave:GetAttribute("Time")
local minutes = microwave:GetAttribute("Minutes")
local seconds = microwave:GetAttribute("Seconds")
if minutes >= 10 then--if minutes is 10 or more
if seconds >= 10 then--if seconds is more than 10
textbox.Text = minutes..":"..seconds
else--if seconds is less than 10
textbox.Text = minutes..":".."0"..seconds
end
else--if minutes is less than 10
if seconds >= 10 then--if seconds is more than 10
textbox.Text = "0"..minutes..":"..seconds
else--if seconds is less than 10
textbox.Text = "0"..minutes..":".."0"..seconds
end
end
end
DisplayTimeEvent.OnClientEvent:Connect(display)
textbox.FocusLost:Connect(function(enterPressed)
if enterPressed then
text = textbox.Text
print(text)
local length = string.len(text)
local numbertext = tonumber(text)
if numbertext ~= nil and length <= 4 then
ChangeTimeEvent:FireServer(numbertext,microwave)
else
display()
end
else
display()
end
end)
Doesn’t seem like it’s the scripts fault, I’m not an expert but could you send me a screenshot of the text box properties? Specifically the Size and Position properties