I made this script where when the disc decal is the same id I put, then it should play the song after it rotates to the rotation I gave them. But apparently it didn't do anything. Looks confusing, but I hope you can fix it.
local arrow = game.Workspace.Arrow
local disc = game.Workspace.PlainDisc2.Decal
local sound = Instance.new("Sound", disc)
debounce = false
radioOn = false
function onClicked() -- Clicked
if not debounce and radioOn and disc.Texture == "rbxassetid://238387775" then --if debounce and radioOn is not true and the Image Id is 238387775 then
debounce = true -- True
radioOn = true -- Radio on
arrow.Rotation = Vector3.new(arrow.Rotation.X, 68.578, arrow.Rotation.Z) -- Turn to turn the music on
sound.SoundId = "rbxassetid://210232032" -- the Music in this Id
sound:Play() --Play it
elseif radioOn and sound.SoundId == "rbxassetid://210232032" and disc.Texture == "rbxassetid://238387775" then -- If the radioOn is true and the sound id and decal id is still the same then
disc.Texture = "rbxassetid://" -- Disc texture id into nothing, so just plain
radioOn = false --Radioon is false
sound:Stop() --Stops the sound
arrow.Rotation = Vector3.new(arrow.Rotation.X, 45.631, arrow.Rotation.Z) --This arrow should go back before the disc is plain and radioOn is false
print("Off" and "PlainDisc") -- prints the Output off and that the disc is Plain
debounce = false -- Debounce is false
end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)

1 comment
Thank you soo much man!