|
| 18 Sep 2014 03:08 PM |
I'm trying to make a brick, that when you touch it, It deletes a sound. However, My script doesn't delete the sound.
function onTouch() i=game.Workspace.Players:FindFirtChild i.PlayerGui:Destroy()
I think I know what the problem is, I believe I didn't call the right location. So where would all audio be located when it gets cloned to the Character? I wan't the audio deleted so the player doesn't here the audio AFTER they touch the brick.
-Siggy Updated Because MasterBlokz Is EXTRA Butt Hurt- |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2014 03:09 PM |
function onTouch() i=game.Workspace.Players:FindFirstChild i.PlayerGui.Ambient:Destroy()
That doesn't work either, can anyone help me out?
-Siggy Updated Because MasterBlokz Is EXTRA Butt Hurt- |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2014 03:10 PM |
script.Parent.Touched:connect(function(hit) if game.Players:FindFirstChild(hit.Parent.Name) then local plr = game.Players[hit.Parent.Name] plr.PlayerGui.Ambient:Destroy() end end) |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2014 03:13 PM |
Oh my, I really need to develop my scripting skills? Mind giving me a few tips on how to start scripting?
Thanks, god bless you! :)
-Siggy Updated Because MasterBlokz Is EXTRA Butt Hurt- |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2014 03:16 PM |
You didnt hook an event to the function, nor end the fucntion.
function FunctionNameHere(Argument) --Some events dont have arguments --stuff end --Ends the fucntion
script.Parent.Touched:connect(FunctionNameHere) --Fires the function with the part that touched it as the argument |
|
|
| Report Abuse |
|
|