Hello, I've been trying to make a grenade tool for a while and the problem I've been running into is that the grenade only goes forward because it comes out of a part inside to tool. I was wondering if I could modify this script to make the grenade go where you're looking at.
local ReplicatedStorage = game.ReplicatedStorage
local Grenade = ReplicatedStorage:WaitForChild('US_Grenade')
local Muzzle = script.Parent:WaitForChild('Muzzle')
local VGrenade1 = script.Parent:WaitForChild('base')
local VGrenade2 = script.Parent:WaitForChild('head')
local VGrenade3 = script.Parent:WaitForChild('leaver')
local VGrenade4 = script.Parent:WaitForChild('pin')
local VGrenade5 = script.Parent:WaitForChild('ring')
Space = game.Workspace
local NewGrenade = Grenade:Clone()
script.Parent.Activated:Connect(function()
wait(1.04)
NewGrenade.Parent = Space
NewGrenade.CFrame = Muzzle.CFrame
NewGrenade.Velocity = Muzzle.CFrame.lookVector * 92
game:GetService('Debris'):AddItem(NewGrenade,49)
wait(0.1)
script.Parent.Script:Destroy()
VGrenade1.Transparency = 1
VGrenade2.Transparency = 1
VGrenade3.Transparency = 1
VGrenade4.Transparency = 1
VGrenade5.Transparency = 1
end)
Extra Info:
Example of what I'm thinking of: If you look down the grenade gets thrown down.
Script Type: Normal Script
ObjectType ~ the grenade: Meshpart not inside a model.

10 comments
oh and make a mouse variable
Is this how you get the make a mouse variable just to double check: local position = mouse. Hit
local Mouse = game.Players.LocalPlayer:GetMouse()
Oh also I'm very sorry for this I messed up and said it was a localscript but its a normal script
I'm sure you can use a remote event to make it on server
So it gave this error: Players.itsbboy.Backpack.MKII.Script:11: attempt to index nil with 'GetMouse'
Again, you can use remote events and use a localscript for the activated event and a normal script for the remoteevent.
So I put it in a localscript and it now goes where I want it to go but the grenade objects scripts don't work anymore
Use remote events if you wanna do server sided.
Ok I took a bit but I got it to work. Thank you so much this helped a lot. Have a great day.