Spinning Disc - Help

Hello,
I’m trying to create a spinning disc that you can turn on/off using a GUI. To make the spinning disc I’ve started by using RotateV by having the base part, a top part, and then welding the disc to the top part. I’m having trouble scripting the disc properly. I’ve managed to make it so the disc can stop spinning using the script:

function onClick()
for i,v in pairs (game.Workspace:GetChildren()) do
spawn(function()
if v.Name == (script.Parent.Parent.Parent.name1.Value) then

v.MainLift.TopParamA = 0
v.MainLift.TopParamB = 0

end

end)
end
end

This works perfectly fine in making the disc stop spinning, but I’m trying to make it begin spinning again using the same script but changing the value and it does not seem to work. Could anyone tell me what object I should use to properly spin the disc, or what to change in the script? The disc has to be able to carry the player too.

Thanks for your help!

1 Like

I’m not quite sure if this is the right category, shouldn’t this go in #help-and-feedback:scripting-support?

1 Like

We need all code involved to see what’s up. In addition, do you see anything in the output?

For now, I can critique some code.

Never repeat yourself! Instead, do script:FindFirstAncestor("name1").Value.

spawn is a horrible practice, and I can’t even believe it’s not deprecated in Lua yet. It’s slower, doesn’t fire immediately, and takes up memory. Use coroutine instead.

Why not just anchor them all and do model:SetPrimaryPartCFrame(CFrame)?