Ok so, I have this brick that grows & shrinks. The goal is it for this to repeatedly do this without any interference, but it seems after 10-15 minutes of the server being up the brick becomes far too large, and I can't seem to figure out why. Any help would be great. while true do
while true do
for i = 1, 15 do
script.Parent.Size = script.Parent.Size + Vector3.new (0.5, 0.5, 0)
wait(0.1)
end
for i = 1, 15 do
script.Parent.Size = script.Parent.Size + Vector3.new (-0.5, -0.5, 0)
wait(0.1)
end
end
You can do that easily by using TweenService and make it repeat from the TweenInfo itself you can do it like this;
Code: ``` local tweenService = game:GetService("TweenService") local part = script.Parent
local tweenInfo = TweenInfo.new( 2, --The time it would take to do the tween Enum.EasingStyle.Linear, --The style it would go about the tween Enum.EasingDirection.Out, --Where the tween will head to -1, --How many it will repeat, but when the number is under 0 or smaller than 0 it will loop forever true, --If it will repeat or not 0, --delay )
local tween = tweenService:Create(part, tweenInfo, {Size = Vector3.new(5,5,5)}) --Making the tween --The size being 5,5,5 means that the tween will make the part change it's size to 5,5,5 then return to the original
tween:Play() --and last part you start the tween, you could stop it after an amount of seconds if you want. wait(10) tween:Stop() ``` You could read more about tweens; https://developer.roblox.com/api-reference/class/TweenService
Hope this helped.