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

Is the a way to prevent a grenade from bouncing too much?

Asked by 6 years ago

When I make a grenade the projectile bounces too much when it hits the ground. If I decrease the velocity of it, it still bounces and can't go as far. Is there a way to stop it from bouncing too much?

01script.Parent.Parent:WaitForChild("Events").ThrowEvent.OnServerEvent:Connect(function(player, weapon, target)
02    local grenade = script.Parent.Parent.Handle:Clone()
03    grenade.CFrame = CFrame.new(grenade.CFrame.p, target)
04    grenade.Velocity = grenade.CFrame.LookVector * 200
05    grenade.Parent = workspace
06    grenade.Anchored = false
07    grenade.CanCollide = true
08    game:GetService("Debris"):AddItem(grenade, 60)
09    script.Parent.Parent.Handle.Transparency = 1
10    wait(3)
11 
12    script.Parent.Parent.Handle.Transparency = 0
13    grenade:Destroy()  
14    local explosion = Instance.new("Explosion", workspace.Baseplate)
15    explosion.BlastPressure = 0
View all 33 lines...
0
why do you wait math.huge seconds to set debounce to false. But you can use a BodyForce with negative force on the Y axis so it's forced downwards User#19524 175 — 6y
1
YOOOOOOOOOOOOO ROBOT KILLER IS BACK LETS GOOOOO WELCOME BACK :D greatneil80 2647 — 6y

1 answer

Log in to vote
0
Answered by 4 years ago

probably set its custom phyisical properties so that its elasticity is like 0 https://developer.roblox.com/en-us/api-reference/datatype/PhysicalProperties

Ad

Answer this question