I made a script, where when I click it, it rotates it to the Rotation number I put in and then it plays the sound for it. And for the elseif it goes back and doesn't play a sound. This is the script:
local tune = game.Workspace.Radio.Tune
sound = Instance.new("Sound")
function onClicked(tune)
if tune.Rotation == Vector3.new(89.999, -69.598, 89.999) then
sound.SoundId = "http://www.roblox.com/asset/id?=209864226"
sound:Play()
wait(75.546000000000006)
sound:Stop()
elseif tune.Rotation == Vector3.new(89.999, -69.598, 89.999) then
print("Off")
end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
Please help. Thank you

1 comment