Hey, I am trying to make a timing system for a racing game, but this LocalScript doesn’t seem to be working. It manages to change the properties of Time1 & Lap1 completely fine, but not Time2 & Lap2. It also prints out “poop”
-- Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")
-- RemoteEvents
local UpdateBoard = ReplicatedStorage:FindFirstChild("TimingEvents").UpdateBoard
-- OOP
local GUI = script.Parent
local TimingFrame = GUI.Frame.TimingFrame
local Template = TimingFrame.NameBoard
UpdateBoard.OnClientEvent:Connect(function(Player, Lap, Time)
local PlayerBoard = TimingFrame.NameBoard:Clone() -- Add player to timing board
local TimeUI = PlayerBoard.Times
if Lap == "Lap1" then -- Display lap 1
PlayerBoard.Name = Player
PlayerBoard.Times.Username.Text = tostring(Player)
PlayerBoard.Parent = TimingFrame
PlayerBoard.Visible = true
TimeUI.Time1.Text = tostring(Time)
TimeUI.Lap1.BackgroundColor3 = Color3.new(0, 255, 0)
TimeUI.Time1.Visible = true
elseif Lap == "Lap2" then -- Display lap 2
TimeUI.Time2.Text = tostring(Time)
TimeUI.Lap2.BackgroundColor3 = Color3.new(0, 255, 0)
TimeUI.Time2.Visible = true
end
end)