So I have a good working script for a union or a part, but for some reason it doesnt work for models what am I doing wrong?
d = false function onClicked() if d == false then d = true
for i = 1,49 do script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, 0, 0.244) * CFrame.fromEulerAnglesXYZ(0, 0, 0) wait() end wait(4) for i = 1,49 do script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, 0, -0.244) * CFrame.fromEulerAnglesXYZ(0, 0, 0) wait() end d = false end
end script.Parent.ClickDetector.MouseClick:connect(onClicked)