I made this at like 6 AM so i'm not sure if i just cant spot the problem, or roblox is being dumb. I seperated the two in different loops because it would error otherwise.
Door = game.Workspace.DoorClaim
TKRWin = game.Workspace.TKRWinClaim
--//Defence\\
Door_Defence = Door.Defence
Door_Max_Defence = Door.Defence.MaxDefence
TKR_Defence = TKRWin.Defence
TKR_Max_Defence = TKRWin.Defence.MaxDefence
--//UI\\
TKR = script.Parent.TKR
Objective = script.Parent.Objective
while wait(.1) do
if Door.Captured == true then
Objective.Text = "TKR Center"
--
pie = (TKR_Defence.Value/TKR_Max_Defence.Value)
TKR.AbsoluteSize = UDim2.new(pie, 1) <-- here
end
end
--
while wait(.1) do
if Door.Captured == false then
Objective.Text = "Door"
--
pie2 = (Door_Defence.Value/Door_Max_Defence.Value)
TKR.AbsoluteSize = UDim2.new(pie2, 1) <-- and here
end
end

1 comment
UDim2.new(pie,0,1,0) and UDim2.new(pie2,0,1,0)