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 » Roblox » All Things ROBLOX
Home Search
 

Re: Scripting Help

Previous Thread :: Next Thread 
Daraked is not online. 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 is not online. Daraked
Joined: 10 Jul 2015
Total Posts: 461
15 Jul 2015 06:54 PM
Bump1
Report Abuse
BossLaw is not online. 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 is not online. Daraked
Joined: 10 Jul 2015
Total Posts: 461
15 Jul 2015 06:55 PM
Are you blind?
Report Abuse
Daraked is not online. 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 is not online. Daraked
Joined: 10 Jul 2015
Total Posts: 461
15 Jul 2015 06:59 PM
Bump4
Report Abuse
Tuneable is not online. 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 is not online. 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
crisdebo0723 is not online. crisdebo0723
Joined: 14 Jul 2013
Total Posts: 8912
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 is not online. 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 is not online. Daraked
Joined: 10 Jul 2015
Total Posts: 461
15 Jul 2015 07:08 PM
Bump5
Report Abuse
Daraked is not online. Daraked
Joined: 10 Jul 2015
Total Posts: 461
15 Jul 2015 08:03 PM
Help
Report Abuse
Daraked is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Roblox » All Things ROBLOX
   
 
   
  • 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