Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
|
| 02 Oct 2016 03:23 PM |
ocal sound = Instance.new("Sound") sound.SoundId = "rbxassetid://241397608" sound.Parent = game.Players.LocalPlayer sound.Volume = .6 sound:Play()
Why isn't this playing the sound to the local player only? For some reason it's playing to the whole server, and btw it's inside of a tool.
|
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
| |
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
| |
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
| |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 02 Oct 2016 03:30 PM |
like i said look in any free mod and you will see how to do it ._.
|
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
|
| 02 Oct 2016 03:32 PM |
I did.
It says to put it in the handle and it doesn't work for me. I'm doing everything and it's not working. |
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
|
| 02 Oct 2016 03:36 PM |
this is what i found in a free model:
HitSound = Instance.new("Sound") HitSound.Name = "HitSound" HitSound.SoundId = "http://www.roblox.com/asset/?id=11945266" HitSound.Pitch = .8
I already have that but mine is playing global for some reason. |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 02 Oct 2016 03:37 PM |
instead of using a script to generate the sound in the tool, instead a sound into the handle, then simply put the id for the sound and tell the script to play it. problem solved
|
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
|
| 02 Oct 2016 03:39 PM |
How do I do that?
Before I tried putting the sound into the Handle and the sound wouldn't play.
I had it as: script.Parent.Handle.Sound:Play()
And that wouldn't play the sound for some reason. |
|
|
| Report Abuse |
|
|
DevVince
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 9245 |
|
|
| 02 Oct 2016 03:39 PM |
| ###################################################################################################################################### |
|
|
| Report Abuse |
|
|
DevVince
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 9245 |
|
|
| 02 Oct 2016 03:40 PM |
| I give up, roblox ruined forums. |
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
|
| 02 Oct 2016 03:41 PM |
yo devvince!!
btw I'm trying to make the sound play local to the player only, your pickaxe script is having problems playing the sound with it inside of handle |
|
|
| Report Abuse |
|
|
DevVince
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 9245 |
|
|
| 02 Oct 2016 03:42 PM |
| Just parent it to the playergui. |
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
|
| 02 Oct 2016 03:44 PM |
parent the sound to the player gui?
also do i leave the sound inside the tool and remove the "play sound" script inside of the tool script? |
|
|
| Report Abuse |
|
|
|
| 02 Oct 2016 03:47 PM |
Try making the sounds parent before the sound ID line. idk
|
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
| |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 02 Oct 2016 03:56 PM |
--local script
local tool = script.Parent local handle = tool.Handle
tool.Equipped:connect(function() if handle:findfirstChild('Sound') then handle.Sound:Destroy() end local sound = Instance.new('Sound',handle) sound.Name = 'Sound' sound.SoundId = 'rbxassetid://11945266' sound.MaxDistance = 500 --how far you want players to hear the sound sound:Play() end)
|
|
|
| Report Abuse |
|
|
|
| 02 Oct 2016 03:59 PM |
Here, I'll help
Fixed code:
local TempGui = Instance.new('ScreenGui',game:GetService('Players').LocalPlayer.PlayerGui) local sound = Instance.new('Sound',TempGui) sound.SoundId = "rbxassetid://241397608" sound.Volume = .6 sound:Play() repeat wait() until sound.IsPlaying == false if sound.IsPlaying == false then TempGui:Remove() end
|
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
|
| 02 Oct 2016 04:13 PM |
@rein
It works but does that script only play it to the local player and not the whole server?
Because I don't want the whole server to hear it. |
|
|
| Report Abuse |
|
|
| |
|