I have a sound block that plays when you click it, but I want the sound to come from a different block because the click block is getting deleted. I've tried:
local move = script.Parent.Parent:WaitForChild("Playing") Brick = script.Parent Sound = Brick.NANI function onClicked() wait(2.9) Sound:Play() end script.Parent.ClickDetector.MouseClick:connect(onClicked)
I know this is incorrect
There are a few things you'll need to do in order to change the sound.
First off, don't use :WaitForChild(). Using :WaitForChild() constantly is a bad habit to get into.
Secondly, in order to make the sound come from a new block, you'll need to go to the workspace.
An example is below.
local sound = game.Workspace.Playing.Sound
In order to use this with your current script, you could do:
local sound = game.Workspace.Playing.Sound function onClicked() wait(2.9) Sound:Play() end script.Parent.ClickDetector.MouseClick:connect(onClicked)
You actually did a pretty good job at making a script.
Good luck in whatever you want to make.
PS: If this doesn't work, leave a comment.