Hey.
I am implementing my FPS framework with the help of the FastCast module. I am having a strange problem where the first bullet each time i begin firing isn’t fired. Every call to the Fire method is from the same place, so i’m unsure why the first one in the loop never fires.
Here is the code within the loop:
This code is all client-side. I havent begun with any kind of replication yet.
while mouseDown == true and currentClip > 0 do
. . .
local weapon = plrvp:FindFirstChildOfClass("Model")
local origin = weapon.Main.CFrame.Position
local direction = weapon.Main.CFrame.LookVector
local range = 5000
local bullet = replicatedStorage.Bullet:Clone()
bullet.CFrame = CFrame.new(origin + (direction * 1.25), origin + direction)
bullet.Parent = workspace
bullet.Size = Vector3.new(0.05, 0.05, 2.5)
print("Firing", origin, direction * 5000, 500, bullet)
gunCaster:Fire(origin, direction * 5000, 500, bullet)
. . .
end
Here is a gif of the problem with DebugMode enabled
https://gyazo.com/90d56fc64097cc105474b970dd89f0d6
It does print out “Firing”, and successfully calls the Fire method, but nothing happens, not even the degug visualization shows up.
Any help is much appreciated
Thanks,
Mezza