generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: help

Previous Thread :: Next Thread 
Mezur is not online. 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 is not online. Mezur
Joined: 29 Jun 2015
Total Posts: 3040
02 Oct 2016 03:24 PM
b1
Report Abuse
Mezur is not online. Mezur
Joined: 29 Jun 2015
Total Posts: 3040
02 Oct 2016 03:27 PM
b2
Report Abuse
Mezur is not online. Mezur
Joined: 29 Jun 2015
Total Posts: 3040
02 Oct 2016 03:30 PM
b3
Report Abuse
TimeTicks is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
02 Oct 2016 03:39 PM
######################################################################################################################################
Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
02 Oct 2016 03:40 PM
I give up, roblox ruined forums.
Report Abuse
Mezur is not online. 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 is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
02 Oct 2016 03:42 PM
Just parent it to the playergui.
Report Abuse
Mezur is not online. 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
thegoodpuppy is not online. thegoodpuppy
Joined: 07 Jul 2011
Total Posts: 2737
02 Oct 2016 03:47 PM
Try making the sounds parent before the sound ID line. idk
Report Abuse
Mezur is not online. Mezur
Joined: 29 Jun 2015
Total Posts: 3040
02 Oct 2016 03:53 PM
b76575
Report Abuse
TimeTicks is not online. 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
Reinitialize is not online. Reinitialize
Joined: 04 Feb 2012
Total Posts: 464
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 is not online. 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
thegoodpuppy is not online. thegoodpuppy
Joined: 07 Jul 2011
Total Posts: 2737
02 Oct 2016 07:33 PM
Test it yourself...
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image