** How would I create a sound that would only play for you when you press a button? or when someone steps on a brick?**
An example of a script would be great, thanks!
Could it possibly have something to do with local bricks, such as a message in a player?
localbin = Instance.new('Message') localbin.Parent = game.Players.LocalPlayer:WaitForChild('Character'). localbin2 = Instance.new('Sound', localbin) localbin2.SoundId = 'soundname'
Also, how would I cause it to play as well? I have no experience in manipulating sound.
From how I'm reading your script, you are attempting to use the WaitForChild
method on the Player's Character
, you can not do that, for it is not searching for the Player's Physical Character, but something inside LocalPlayer
named Character
, you are also calling 'localbin' to create Message, yet you are not using it anywhere in the code that I can see, also, you are attempting to change localbin2
's SoundId
to soundname
, it MUST be a Link, because nothing will play otherwise, here is how it would look like;
repeat wait() until game.Players.LocalPlayer and game.Players.LocalPlayer.Character localbin = Instance.new("Message") --What is this used for? :/ localbin.Parent = game.Players.LocalPlayer.Character localbin2 = Instance.new("Sound", localbin) localbin2.SoundId = "http://www.roblox.com/asset/?id=num"
Hope this helped!