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: Global LocalScript?

Previous Thread :: Next Thread 
sigve10 is not online. sigve10
Joined: 25 Jun 2009
Total Posts: 30
04 Jun 2015 01:17 AM
Im trying to make a localscript run a sound Globally (so other players can hear it). Any ways I can do this?
I'm making an animation button but I need the localscript to find the players with the localplayer function, and I need that when the button is hit it plays the sound from the character's head.

Please describe what you are showing me with the scripts... I need to know what they do
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
04 Jun 2015 01:19 AM
just play the sound from the server.
Report Abuse
T0W3R is not online. T0W3R
Joined: 13 Jul 2011
Total Posts: 384
04 Jun 2015 01:22 AM
^
Exactly, just play the sound from the server.

It would be much easier.
Report Abuse
cody123454321 is not online. cody123454321
Joined: 21 Nov 2009
Total Posts: 5408
04 Jun 2015 01:28 AM

Script: SoundService
Parent Workspace
Tree: RemoteEvent: Tunnel
Contents:
script.Tunnel.OnServerEvent:connect(function(player, arg1)
if(arg1 == "play_sound")then
game.Workspace.Sound:Player()
end
end)

LocalScript: SoundExecutor
Parent:StarterPack
Tree: Empty
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()

mouse.KeyDown:connect(function(key)
if(key == "q")then
game.Workspace.SoundService.Tunnel:FireServer("play_sound")
end
end)

Sound: Sound
Parent: Workspace
Tree: Empty



Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
04 Jun 2015 01:30 AM
^
Don't use keydown, noob.
Report Abuse
IoIiderp is not online. IoIiderp
Joined: 05 Feb 2012
Total Posts: 8613
04 Jun 2015 01:34 AM
^
Beginners use it because its much easier.
Don't be rude.
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
04 Jun 2015 01:37 AM
local CAS = game:GetService("ContextActionService")

function onKeyPress(actionName, inputState, inputObject)
if inputState == Enum.UserInputState.Begin then
RemoteEvent:FireAtServer("Die")
end
end

CAS:BindAction("onKeyPress", onKeyPress, true, Enum.KeyCode.F)



Doesn't seem like it.
Report Abuse
Glaucous is not online. Glaucous
Joined: 08 Dec 2010
Total Posts: 29
04 Jun 2015 02:01 AM
^ Terribly rude
Report Abuse
ImperialOutcast is not online. ImperialOutcast
Joined: 24 Nov 2009
Total Posts: 12054
04 Jun 2015 02:03 AM
Indeed HES a ...
Report Abuse
IoIiderp is not online. IoIiderp
Joined: 05 Feb 2012
Total Posts: 8613
04 Jun 2015 02:44 AM
nQ sorry to spoil it but it won't work :)
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
04 Jun 2015 02:49 AM
yes it will :)
Report Abuse
IoIiderp is not online. IoIiderp
Joined: 05 Feb 2012
Total Posts: 8613
04 Jun 2015 07:08 AM
define RemoteEvent first then
Report Abuse
sigve10 is not online. sigve10
Joined: 25 Jun 2009
Total Posts: 30
12 Aug 2015 02:05 AM
I'm a bit afraid of saying this, but I dont need this post anymore and I haven't needed it for like, 4 months?
I know how i can use remoteevents to do this :P
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
12 Aug 2015 02:13 AM
then why did you bump it? -_-
Report Abuse
LongKillKreations is not online. LongKillKreations
Joined: 14 Feb 2014
Total Posts: 4502
12 Aug 2015 02:26 AM
bump
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
12 Aug 2015 02:27 AM
"Global LocalScript"

irony
Report Abuse
LongKillKreations is not online. LongKillKreations
Joined: 14 Feb 2014
Total Posts: 4502
12 Aug 2015 02:32 AM
Even the most beginner scripters should have more scripting common sense than this lol.
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