so in my last question the answer worked so i decided i wanted the loop to stop after the character reaches a certain size. so i added a break at the size of 5 but it keeps adding over 5. can someone help
game.ReplicatedStorage.titanshifted.OnServerEvent:Connect(function(player)
local bds = game.Workspace:FindFirstChild(player.name):WaitForChild("Humanoid").BodyDepthScale
local bhs = game.Workspace:FindFirstChild(player.name):WaitForChild("Humanoid").BodyHeightScale
local bps = game.Workspace:FindFirstChild(player.name):WaitForChild("Humanoid").BodyProportionScale
local bts = game.Workspace:FindFirstChild(player.name):WaitForChild("Humanoid").BodyTypeScale
local bws = game.Workspace:FindFirstChild(player.name):WaitForChild("Humanoid").BodyWidthScale
local hs = game.Workspace:FindFirstChild(player.name):WaitForChild("Humanoid").HeadScale
print(player.name.." Titan Shifted")
wait(3)
while true do
wait(0.1)
bds.Value = bds.Value + 0.1
bhs.Value = bhs.Value + 0.1
bps.Value = bps.Value + 0.1
bts.Value = bts.Value + 0.1
bws.Value = bws.Value + 0.1
hs.Value = hs.Value + 0.1
if bds.Value == 5 and bhs.Value == 5 and bps.Value == 5 and bts.Value == 5 and bws.Value == 5 and hs.Value == 5 then
break
end
end
end)

1 comment
instead of using == try using <= and then set their values to 5 and make sure to add the break