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)

2 comments
That's because Models don't have a
CFrame, they're just a container to hold objects, they don't have any real functionality. You can only move models usingSetPrimaryPartCFrameand use a PrimaryPart on your model.Ok! I'll try that! thanks