local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
mouse.Button1Down:Connect(function()
if mouse.Target == nil then
else
while wait() do
game.ReplicatedStorage.Fire:FireServer(player,mouse.Hit)
end
end
end)
Script:
game.ReplicatedStorage.Fire.OnServerEvent:Connect(function(x,player,mouse)
local Part = Instance.new("Part",workspace)
Part.Anchored = true
Part.CanCollide = false
warn(mouse)
Part.CFrame = mouse
wait(.2)
Part:Destroy()
end)
You’re gonna want to put all the parts in a specific folder and then use Mouse.TargetFilter to blacklist all the descendants of that folder from blocking the mouse’s hit position.
Since it’s just 1 or 2 extra lines I’ve decided to just add them in for you
Localscript:
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
mouse.TargetFilter = workspace.MouseIgnores --Needs a folder in workspace called MouseIgnores
mouse.Button1Down:Connect(function()
if mouse.Target == nil then
else
while wait() do
game.ReplicatedStorage.Fire:FireServer(player,mouse.Hit)
end
end
end)
game.ReplicatedStorage.Fire.OnServerEvent:Connect(function(x,player,mouse)
local Part = Instance.new("Part")
Part.Anchored = true
Part.CanCollide = false
warn(mouse)
Part.CFrame = mouse
Part.Parent = workspace.MouseIgnores --Needs a folder in workspace called MouseIgnores
wait(.2)
Part:Destroy()
end)