Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Grenade script not working. Anybody help?

Asked by 10 years ago

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

Log in to vote
0
Answered by 10 years ago

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

0
Alright. And this script goes into the Starterpack, by the way. TheRings0fSaturn 28 — 10y
Ad
Log in to vote
0
Answered by 7 years ago

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

Answer this question