Daraked
|
  |
| Joined: 10 Jul 2015 |
| Total Posts: 461 |
|
|
| 15 Jul 2015 06:52 PM |
I know I may be in the wrong forum, but Scripters Sub-Forum is dead, anyways ontopic of my script:
I tried making the zooming in and out sounds work, but when I tried it, it doesnt work. Whats wrong with the zooming in and out part?
function waitForChild(parent, childName) local child = parent:findFirstChild(childName) if child then return child end while true do child = parent.ChildAdded:wait() if child.Name==childName then return child end end end
function newSound(id) local sound = Instance.new("Sound") sound.SoundId = id sound.archivable = false sound.Parent = script.Parent.Head return sound end
-- declarations
local sDied = newSound("rbxasset://sounds/uuhhh.wav") local sOuch = newSound("rbxasset://sounds/splat.wav") local sFallingDown = newSound("rbxasset://sounds/splat.wav") local sFreeFalling = newSound("rbxasset://sounds/swoosh.wav") local sGettingUp = newSound("rbxasset://sounds/hit.wav") local sJumping = newSound("rbxasset://sounds/swoosh.wav") local sRunning = newSound("rbxasset://sounds/bfsl-minifigfoots1.mp3") local sZoomingIn = newSound("rbxasset://sounds/SWITCH3.wav") local sZoomingOut = newSound("rbxasset://sounds/SWITCH3.wav") sRunning.Looped = true
local Figure = script.Parent local Head = waitForChild(Figure, "Head") local Humanoid = waitForChild(Figure, "Humanoid")
-- functions
function onDied() sDied:Play() sOuch:Play() end
function onState(state, sound) if state then sound:Play() else sound:Pause() end end
function onRunning(speed) if speed>0 then sRunning:Play() else sRunning:Pause() end end
function onZoomingIn(speed) if speed>0 then sZoomingIn:Play() else sZoomingIn:Pause() end end
function onZoomingOut(speed) if speed>0 then sZoomingOut:Play() else sZoomingOut:Pause() end end
-- connect up
Humanoid.Died:connect(onDied) Humanoid.Running:connect(onRunning) Humanoid.Jumping:connect(function(state) onState(state, sJumping) end) Humanoid.GettingUp:connect(function(state) onState(state, sGettingUp) end) Humanoid.FreeFalling:connect(function(state) onState(state, sFreeFalling) end) Humanoid.FallingDown:connect(function(state) onState(state, sFallingDown) end) Humanoid.ZoomingIn:connect(function(state) onState(state, sZoomingIn) end) Humanoid.ZoomingOut:connect(function(state) onState(state, sZoomingOut) end) |
|
|
| Report Abuse |
|
|
Daraked
|
  |
| Joined: 10 Jul 2015 |
| Total Posts: 461 |
|
| |
|
BossLaw
|
  |
| Joined: 28 Feb 2013 |
| Total Posts: 5383 |
|
|
| 15 Jul 2015 06:54 PM |
Wrong forums.
--BossLaw ll https://www.youtube.com/channel/UC7wBwU9fRY5CwDlQlsESMaA |
|
|
| Report Abuse |
|
|
Daraked
|
  |
| Joined: 10 Jul 2015 |
| Total Posts: 461 |
|
| |
|
Daraked
|
  |
| Joined: 10 Jul 2015 |
| Total Posts: 461 |
|
|
| 15 Jul 2015 06:58 PM |
| please help, I know that is probably taking forever, but I need help bad. I am updating my game and it is taking forever. |
|
|
| Report Abuse |
|
|
Daraked
|
  |
| Joined: 10 Jul 2015 |
| Total Posts: 461 |
|
| |
|
Tuneable
|
  |
| Joined: 16 Feb 2013 |
| Total Posts: 2932 |
|
|
| 15 Jul 2015 07:01 PM |
| Humanoid has no events titled "ZoomingIn" and "ZoomingOut" |
|
|
| Report Abuse |
|
|
Daraked
|
  |
| Joined: 10 Jul 2015 |
| Total Posts: 461 |
|
|
| 15 Jul 2015 07:03 PM |
@tuneable
So what should I do?
What should I change? |
|
|
| Report Abuse |
|
|
|
| 15 Jul 2015 07:04 PM |
http://www.roblox.com/Forum/ShowForumGroup.aspx?ForumGroupID=9
Just fix me up a dang coffee, will ya? |
|
|
| Report Abuse |
|
|
Daraked
|
  |
| Joined: 10 Jul 2015 |
| Total Posts: 461 |
|
|
| 15 Jul 2015 07:05 PM |
@cris
Man, your are one of a person.
I need help on this script, I already posted it on there but it is dead for 10 minutes and then someone replies. |
|
|
| Report Abuse |
|
|
Daraked
|
  |
| Joined: 10 Jul 2015 |
| Total Posts: 461 |
|
| |
|
Daraked
|
  |
| Joined: 10 Jul 2015 |
| Total Posts: 461 |
|
| |
|
Daraked
|
  |
| Joined: 10 Jul 2015 |
| Total Posts: 461 |
|
|
| 15 Jul 2015 08:10 PM |
Why dont I get any help?
You guys are noobs. :( |
|
|
| Report Abuse |
|
|