local tool = script.Parent
local rf = game.ReplicatedStorage.remotes:WaitForChild("bullet")
local shooting = false
tool.Activated:Connect(function()
if shooting == false then
shooting = true
local player = game.Players:GetPlayerFromCharacter(tool.Parent)
local mousehitvec = rf:InvokeClient(player)
print("ez")
local rayparams = RaycastParams.new()
rayparams.FilterType = Enum.RaycastFilterType.Blacklist
local raynew = workspace:Raycast(tool.Pointgun.Position, mousehitvec, rayparams)
print("not ez")
if raynew then
print("The thing that the ray touched was " .. raynew.Instance:GetFullName())
print("not ez")
else print("u bad iam")
print("not ez")
end
wait(1)
shooting = false
end
end)
COMMUNITY QUESTION
How do I solve this? It isnt printing when it hits something
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Does the tool work otherwise? I am Meaning does it still work even tho the print doesn't work?
Sorry for my bad explanation, resuming the script works until the if raynew. It always print the thing after else EVEN if I shoot on a part or something else.