Exactly as the title says.
In studio it works perfectly fine, but in-game it’s all over the place. Here’s some of the code:
Thank you in advanced.
(in studio it’s counting up as it’s suppose to, in-game it is just showing a dozen negative numbers)
Server:
plrz.TrialTimes:FindFirstChild(v.Name).Value = os.clock()
plrz.Time.activeTimeTrial.activeColour.Value = v.Name
print("------------ OBBY TEST : VERSION 0.4 // 04:16 ------------")
print(plrz.TrialTimes:FindFirstChild(v.Name).Value, " -- server time it's adding")
wait(1)
print(v.Name)
local PickedColour = v.Name
print(PickedColour)
game.ReplicatedStorage.en.StartTime:FireClient(plrz, PickedColour)
Client:
game.ReplicatedStorage.en.StartTime.OnClientEvent:Connect(function(PickedColour)
print(PickedColour)
local grabColour = lplr.TrialTimes:FindFirstChild(PickedColour):GetChildren()[1].Value -- get best time
print(grabColour, "this is grab colour! ")
if grabColour ~= "nil" then
script.Parent.Parent.BestTimeFrame.TextLabel.Text = grabColour
end
repeat
wait(0.1)
print(ftime1)
print(os.clock())
local ftime1 = lplr.TrialTimes:FindFirstChild(PickedColour).Value
print(ftime1 - os.clock(), " -- fttime1 - os.clock() is this one")
print(os.clock() - ftime1, " -- os.clock() - fttime1 is this one")
local ftime = tonumber(os.clock()) - (tonumber(ftime1))
local firstnumber = string.split(ftime, ".")
local secondNumber = string.split(firstnumber[2], "")
print(ftime, " -- ftime this one is")
print(ftime1, " -- ftimeONE this one is, I promise !!")
if lplr.Time.activeTimeTrial.Value == true then
timerz.Text = firstnumber[1] .. "." .. secondNumber[1] .. secondNumber[2]
if grabColour == "nil" then
script.Parent.Parent.BestTimeFrame.TextLabel.Text = firstnumber[1] .. "." .. secondNumber[1] .. secondNumber[2]
end
end
until lplr.Time.activeTimeTrial.Value == false
timerz.Text = lplr.TrialTimes:FindFirstChild(lplr.Time.activeTimeTrial.activeColour.Value).Value
end)