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: sound failed to load?

Previous Thread :: Next Thread 
dorito9000 is not online. dorito9000
Joined: 13 Jul 2012
Total Posts: 6486
04 Oct 2015 06:59 PM
im trying to play this sound http://www.roblox.com/Sad-Violin-item?id=147080452 with the follwoing script:


function onTouched(hit)
local humanoid = hit.Parent:findFirstChild("Humanoid")

if humanoid ~= nil then
ogm = humanoid.Parent.Head
blow = Instance.new("Explosion", ogm)
blow.Position = ogm.Position
blow.BlastRadius = 0
blow.BlastPressure = 0
wait (1)
sond = Instance.new("Sound", humanoid.Parent.Torso)
sond.SoundId = 147080452


tagHumanoid(humanoid)
humanoid:TakeDamage(damage)
untagHumanoid(humanoid)
end

HitSound:Play()
sond:Play()
ball.Parent = nil

end

but i keep getting this error

19:59:30.015 - Sound failed to load : Workspace.AhhTree.Torso.Sound

BEEP BEEP HERE COMES THE MEME CREEP
Report Abuse
CodedEffects is not online. CodedEffects
Joined: 16 Feb 2015
Total Posts: 179
04 Oct 2015 07:02 PM
failed to explain what part you are going to touch
Report Abuse
dorito9000 is not online. dorito9000
Joined: 13 Jul 2012
Total Posts: 6486
04 Oct 2015 07:03 PM
it doesnt matter what part your gonna hit it matters if the parent has a humanoid in it

BEEP BEEP HERE COMES THE MEME CREEP
Report Abuse
CodedEffects is not online. CodedEffects
Joined: 16 Feb 2015
Total Posts: 179
04 Oct 2015 07:04 PM
Add script.(what the brick is that the humanoid is going to touch):connect onTouch()


Send me trades! Looking to downgrade and upgrade!
Report Abuse
dorito9000 is not online. dorito9000
Joined: 13 Jul 2012
Total Posts: 6486
04 Oct 2015 07:07 PM
heres the entire script

ball = script.Parent
damage = 10

HitSound = Instance.new("Sound")
HitSound.Name = "HitSound"
HitSound.SoundId = "http://www.roblox.com/asset/?id=11945266"
HitSound.Parent = ball
HitSound.Volume = 1



function onTouched(hit)
local humanoid = hit.Parent:findFirstChild("Humanoid")

if humanoid ~= nil then
ogm = humanoid.Parent.Head
blow = Instance.new("Explosion", ogm)
blow.Position = ogm.Position
blow.BlastRadius = 0
blow.BlastPressure = 0
wait (1)
sond = Instance.new("Sound", humanoid.Parent.Torso)
sond.SoundId = 147080452


tagHumanoid(humanoid)
humanoid:TakeDamage(damage)
untagHumanoid(humanoid)
end

HitSound:Play()
sond:Play()
ball.Parent = nil

end

function tagHumanoid(humanoid)
-- todo: make tag expire
local tag = ball:findFirstChild("creator")
if tag ~= nil then
local new_tag = tag:clone()
new_tag.Parent = humanoid
end
end


function untagHumanoid(humanoid)
if humanoid ~= nil then
local tag = humanoid:findFirstChild("creator")
if tag ~= nil then
tag.Parent = nil
end
end
end

connection = ball.Touched:connect(onTouched)

wait(5)
--ball.SparkSound.Looped = false
--ball.SparkSound:Stop()
ball.Parent = nil


BEEP BEEP HERE COMES THE MEME CREEP
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