So basically, I have this code that gives me a stick, but I want to make it play a sound when i click with it. The problem is, the current one I am using doesn't work!
The full script is here.
Stick.Activated = false
Instance.new("Part",workspace)
game.Workspace.Part.Name = "Handle"
game.Workspace.Handle.BrickColor = BrickColor.New('CGA brown')
game.Workspace.Handle.Size = Vector3.new(1.06, 4.75, 0.91)
game.Workspace.Handle.Anchored = false
wait()
Instance.new("Tool",workspace)
game.Workspace.Tool.Parent = game.Players.Paladior.Backpack
game.Workspace.Handle.Parent = game.Players.Paladior.Backpack.Tool
game.Players.Paladior.Backpack.Tool.Name = "Stick"
game.Players.Paladior.Backpack.Stick.ToolTip = "hehe stick go b o n k"
game.Players.Paladior.Backpack.Stick.GripPos = Vector3.new(0, -2, 0.2)
tool= game.Players.Paladior.Backpack.Stick
player=game.Players.LocalPlayer
tool.Activated:connect(function()
tool.GripForward = Vector3.new(0,10,-1)
clicked = true
wait(0.5)
tool.GripForward = Vector3.new(0,0,1)
clicked = false
end)
--tons and tons of SPECIAL EFFECTS
if
Stick.Activated == true
then
Instance.new("Sound",Workspace)
Sound.SoundId = '130944130'
Sound.name = 'bonk'
game.Workspace.bonk.Parent = SoundService
game.SoundService.bonk:Play()
If you don't want to read all of that, the part that isn't working is here.
--tons and tons of SPECIAL EFFECTS
if
Stick.Activated == true
then
Instance.new("Sound",Workspace)
Sound.SoundId = '130944130'
Sound.name = 'bonk'
game.Workspace.bonk.Parent = SoundService
game.SoundService.bonk:Play()
I'm using a value at the top of the script, but that's not working either. Any help is appreciated!

5 comments
I'M A CLOWN. I accidentally pasted the same script twice in the first one, I will try to fix it lol
i think i fixed it
I'm posting this as a comment as I am not sure... But have you made a chunk of sceipt
Script that makes it activate when clicked?
Why not use a "if humanoid if the object touching stick, play sound" if statement?