Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can I made on-ride music for roller coasters?

How can I put music that plays only when a player is riding the roller coaster?

1 answer

✓ Accepted answer

There are multiple ways of doing this. But I think the simpliest way to do it would be to add an invisible square where the roller coaster starts. And have it cover all the seats but not covering the entire roller coaster.

Add a script in the invisible square. Then add a sound in workspace, just call it "Sound", put the sound id for the music you want. And make sure the option "Playing", is off, and "Looped", is on. Then in the script type this:

script.Parent.Touched:Connect(function(hit)

local Humanoid = hit.Parent:FindFirstChild("Humanoid") if Humanoid then

              local Sound = workspace.Sound
                       Sound.Playing = true
                
   end                     

end)

Oh and also change the sounds "MaxDistance:", to something like 10.

This discussion is preserved as it was. New answers, comments, and votes are closed.