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
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 04 Jun 2015 01:19 AM |
| just play the sound from the server. |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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 |
|
|
| |
|
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 |
|
|
|
| 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
|
  |
| Joined: 08 Dec 2010 |
| Total Posts: 29 |
|
| |
|
| |
|
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 |
|
|
| |
|
IoIiderp
|
  |
| Joined: 05 Feb 2012 |
| Total Posts: 8613 |
|
|
| 04 Jun 2015 07:08 AM |
| define RemoteEvent first then |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 12 Aug 2015 02:13 AM |
| then why did you bump it? -_- |
|
|
| Report Abuse |
|
|
| |
|
instawin
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
| |
|
|
| 12 Aug 2015 02:32 AM |
| Even the most beginner scripters should have more scripting common sense than this lol. |
|
|
| Report Abuse |
|
|