So, the music plays and the Disc moves at the same time, but when it is turned of the disc still keeps moving.
local isOn = false
local Disc = script.Parent.Parent.Disc
function on()
isOn = true
script.Parent.Loop:Play()
while true do
wait(0.1)
script.Parent.Parent.Disc.CFrame =
script.Parent.Parent.Disc.CFrame*CFrame.fromEulerAnglesXYZ(0,0.1,0)
end
end
function off()
isOn = false
script.Parent.Loop:Stop()
wait(0.1)
script.Parent.Parent.Disc.CFrame = script.Parent.Parent.Disc.CFrame*CFrame.fromEulerAnglesXYZ(0,0,0)
end
function onSelected(player,Choice)
if Choice.Name == "on" then
on()
elseif Choice.Name == "off" then
off()
end
end
script.Parent.Dialog.DialogChoiceSelected:connect(onSelected)

2 comments
Thank You! It works!
You're Welcome ! ;)