local grov = true
game.ReplicatedStorage.ICe.OnServerEvent:Connect(function(player,mouse)
local char = player.Character
local x = Instance.new("Part",workspace)
local d = Instance.new("BodyVelocity",x)
x.Anchored = true
d.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
x.BrickColor = BrickColor.new("Toothpaste")
x.Material = "Neon"
x.Size = Vector3.new(1.26, 0.64, 0.72)
x.Position = char.Head.Position +Vector3.new(1,0,0)
x.CanCollide = false
x.Anchored = false
d.Velocity = mouse.Hit.LookVector * 99
x.Touched:Connect(function(Hit)
if Hit:IsA("BasePart") then
local c = Instance.new("Explosion")
c.Position = x.Position
c.Parent = workspace
end
end)
end)
COMMUNITY QUESTION
how do i fix attempt to index local 'mouse' (a nil value)?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
This is a regular script yes? You’ll need a local script along with the regular script to get the players mouse and ref RepStorage
its a local script
why do you use on server event in a local script? Also, you Instance.new stuff in the client only shows on the client