Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make It so that when I click anything it plays a sound when I stop it doesn't?

Asked by 2 years ago

Hi guys, So uh can anyone help me with this script: Sound = Instance.new("Sound") Sound.Parent = game.workspace Sound = "9815509707" function onclick(mouse) Sound:Play() end

0
Also forgot to mention i want it to only be client Pro_beatz 36 — 2y

1 answer

Log in to vote
0
Answered by 2 years ago

made you a script that works

01local player = game:GetService("Players").LocalPlayer
02local mouse = player:GetMouse()
03 
04--functions
05 
06local function playsound()
07    --plays the sound
08    sound = Instance.new("Sound")
09    sound.Parent = player.Character
10    sound.SoundId = "rbxassetid://9815509707"
11    sound:Play()
12 
13end
14 
15local function stopsound()
View all 23 lines...
0
Thanks, bro i suck at scripting Pro_beatz 36 — 2y
0
make sure to put it in starter player scripts Not_prototype 50 — 2y
Ad

Answer this question