hello guys i am trying to make a banan gun yea i know so creat but anyway i let my friend play test it but they are saying the ray is hard to aim how could i make the ray so accurat
this is the scirpt of the gun
local tool = script.Parent
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local Character = Player.Character or Player.CharacterAdded:Wait()
local event = game.ReplicatedStorage:WaitForChild("MonkeyTime")
local raycastingParms = RaycastParams.new()
raycastingParms.FilterDescendantsInstances = {tool:GetChildren(),game.Workspace:WaitForChild("Bananas")}
raycastingParms.FilterType = Enum.RaycastFilterType.Exclude
raycastingParms.IgnoreWater =true
tool.Activated:Connect(function()
local RayUine = Mouse.UnitRay
local Direction = (RayUine.Direction).Unit * 200
local raycasting = workspace:Raycast(tool.Handle.Position+Vector3.new(0,2.5,0),Direction,raycastingParms) - problem here
if raycasting then
if raycasting.Instance then
if raycasting.Instance.Parent:FindFirstChild("Humanoid") or raycasting.Instance.Parent.Parent:FindFirstChild("Humanoid") then
event:FireServer(raycasting.Instance.Parent)
else
print(raycasting.Instance)
local raycastingColor = raycasting.Instance.Color
raycasting.Instance.Color = Color3.new(1, 0, 0.0156863)
task.wait(1)
raycasting.Instance.Color = raycastingColor
end
else
print('no object was found')
end
else
print("no result :<")
end
end)