Is the a way to prevent a grenade from bouncing too much?
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?
01 | script.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 |
12 | script.Parent.Parent.Handle.Transparency = 0 |
14 | local explosion = Instance.new( "Explosion" , workspace.Baseplate) |
15 | explosion.BlastPressure = 0 |
16 | explosion.BlastRadius = 8 |
17 | explosion.ExplosionType = Enum.ExplosionType.NoCraters |
18 | explosion.Position = grenade.Position |
19 | explosion.Hit:Connect( function (part, distance) |
20 | local humanoid = part.Parent:FindFirstChild( "Humanoid" ) |
21 | if humanoid and not debounce then |
23 | humanoid:TakeDamage( 115 - (distance * 5 )) |
24 | if humanoid.Health < = 0 and game:GetService( "ReplicatedStorage" ).Gamemode.Value = = "Team Deathmatch" then |
25 | player.leaderstats.Kills.Value = player.leaderstats.Kills.Value + 1 |
26 | player.leaderstats.Streak.Value = player.leaderstats.Streak.Value + 1 |
27 | game:GetService( "ReplicatedStorage" ).ScoreValues [ player.Team.Name.. "ScoreValue" ] .Value = game:GetService( "ReplicatedStorage" ).ScoreValues [ player.Team.Name.. "ScoreValue" ] .Value + 1 |