Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Grenade script not working. Anybody help?

Basically, when you press the right mouse button, your character will throw a grenade from his torso. But. the script isn't working. Can anyone fix it?

function onButton2Down(m)
local Grenade = Instance.new.Part
Grenade.FormFactor = 0
Grenade.Reflectance = 0
Grenade.Transperancy = 0
Grenade.Size = 1,1,1
Grenade.Locked = true
Grenade.CanCollide = true
Grenade.Position = Owner.Torso
end


local Mesh = Instance.new.SpecialMesh
local Special Mesh = GMesh
GMesh.MeshId = "http://www.roblox.com/Asset/?id=10207236"
GMesh.Parent = Grenade

local Explode = Instance.new.Explosion
local Explosion = Ex
Ex.BlastRadius = 5
Ex.BlastPressure = 5000
Ex.ExplosionType = Nocraters
Sound1.Play()

local Sound = Instance.New.Sound
local Sound = Sound1
Sound1.Play = false
Sound1.Enabled = true








2 answers

I think it's because you didn't define what onButton2Down is. I'm not sure how to help you though other than saying that.

1 comment

0

Alright. And this script goes into the Starterpack, by the way.

This script does not alter the velocity of the grenade on player's hand.

This discussion is preserved as it was. New answers, comments, and votes are closed.