I want to make a stopwatch. I'm not very professional at coding but here is a decent script I produced but before I got to finish, I got this error in the output and I don't understand. It says I'm attempting to index string with the property Text but I'm not. All I'm doing is trying to get the property.
Here is my LocalScript:
local frame = script.Parent
local ifPause = frame.pauseAppear
local PauseButton = frame.Pause
local ResetButton = frame.Reset
local timeText = frame:WaitForChild("Time")
local seconds = 0
local minutes = 0
local hours = 0
timeText = "00:00:00"
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(input, gameProcessed)
if input.KeyCode == Enum.KeyCode.Q then
for i = 1, math.huge, 1 do
seconds = i
if seconds == 60 then
minutes = minutes + 1
seconds = 0
end
timeText.Text = hours..":"..minutes..":"..seconds --//Errors on this line
wait(1)
end
end
end)
So as I said, I'm not sure what is wrong. Any help would be appreciated and thanks for taking your time.

2 comments
You know, a Frame doesn't have a Text property
Yes I know