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 » Scripting Helpers
Home Search
 

Re: Sound will not play

Previous Thread :: Next Thread 
micah726 is not online. micah726
Joined: 09 Nov 2006
Total Posts: 826
06 Jan 2014 03:00 PM
player = script.Parent.Parent.Parent

head = player.Character.Head

mouse = player:GetMouse()

local tool = script.Parent

swoosh = script.Swoosh

explosionsound = script.Explosion

selected = false

reloaded = true

--[[function equip()
mouse.Button1Down:connect(fire)
end--]]

function fire()
if selected == false then
return
end
if reloaded == false then
return
end

reloaded = false
lemon = Instance.new("Part")
lemon.Parent = Workspace
lemon.Anchored = false
lemon.Size = Vector3.new(1,1,4)
lemon.Velocity = 16*(mouse.Hit.p - head.Position).unit
lemon.CFrame = CFrame.new(head.Position + (mouse.Hit.p - head.Position).unit*5,head.Position + (mouse.Hit.p - head.Position).unit*6)
game.Debris:AddItem(lemon, 1000/12)
antigrav = Instance.new("BodyForce")
antigrav.Parent = lemon
antigrav.force = Vector3.new(0,(9.81*20)*lemon:GetMass(),0)
lemon.Touched:connect(squeeze)
swoosh:Play()
wait(2)
reloaded = true

end

function squeeze()
local repair = Instance.new("Explosion")
repair.Parent = Workspace
repair.BlastPressure = 10
repair.Position = lemon.Position
swoosh:Stop()
explosions:Play()
lemon:Destroy()



end

tool.Selected:connect(function()
print("Selected")
selected = true
end)

tool.Deselected:connect(function()
print("Deselected")
selected = false
end)
mouse.Button1Down:connect(fire)


Report Abuse
micah726 is not online. micah726
Joined: 09 Nov 2006
Total Posts: 826
06 Jan 2014 03:02 PM
Problem solved, nevermind.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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