How To Make a Sound Play on Touch! - Roblox Studio

Опубликовано: 18 Май 2026
на канале: Józef
200
15

Hello! This is my first video, where I show you how to make a sound play when a player touches a block in Roblox Studio!

You should be aware that I accidentally messed up the code a little bit while recording this and that I will do my best to improve on how I make these videos in the future!
- - - - - - - - - - - - - - - - - -
Script:
local sound = game.Workspace.Audio - - - Put the name of your sound here!

local part = script.Parent

local function audio()
if not sound.IsPlaying then
sound:Play()
end
end

part.Touched:Connect(audio)
- - - - - - - - - - - - - - - - - -
Chapters:
00:00 - Intro
00:30 - Setting up the block
00:50 - Coding the block
03:30 - Adding your audio
04:00 - Adding the audio to the code
04:15 - Adjusting the audio
04:55 - Testing
05:10 - Outro
- - - - - - - - - - - - - - - - - -
If you enjoyed this video, you should consider leaving a like and subscribing to support me if you'd like to!

Thanks for watching!
- - - - - - - - - - - - - - - - - -
Tags:

#roblox #robloxstudio #capcut