So, i was basically doing a spinner but the code decided to not work and only run one time and break
Heres the code:
local dot1 = script.Parent:WaitForChild("dot1")
local dot2 = script.Parent:WaitForChild("dot2")
local dot3 = script.Parent:WaitForChild("dot3")
local dot4 = script.Parent:WaitForChild("dot4")
local dot4 = script.Parent:WaitForChild("dot4")
local ts = game:GetService("TweenService")
local pos1 = dot1.Position
local pos2 = dot2.Position
local pos3 = dot3.Position
local pos4 = dot4.Position
local anc1 = dot1.AnchorPoint
local anc2 = dot2.AnchorPoint
local anc3 = dot3.AnchorPoint
local anc4 = dot4.AnchorPoint
function tween(obj,time,props)
ts:Create(obj,TweenInfo.new(time,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut),props):Play()
end
function spin()
tween(dot1,0.3,{Position = pos3,AnchorPoint = anc3})
tween(dot2,0.3,{Position = pos1,AnchorPoint = anc1})
tween(dot3,0.3,{Position = pos4,AnchorPoint = anc4})
tween(dot4,0.3,{Position = pos2,AnchorPoint = anc2})
wait(0.3)
local pos1 = dot1.Position
local pos2 = dot2.Position
local pos3 = dot3.Position
local pos4 = dot4.Position
local anc1 = dot1.AnchorPoint
local anc2 = dot2.AnchorPoint
local anc3 = dot3.AnchorPoint
local anc4 = dot4.AnchorPoint
end
while true do
spin()
wait()
end
Hirearchy:
Heres a clip of it happening:
Please just help me fix this.