#FastCast wont visualize

1 messages · Page 1 of 1 (latest)

rustic plank
#
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Shooting = ReplicatedStorage.RemoteEvent:WaitForChild("Shooting")

Shooting.OnServerEvent:Connect(function(player,Position,Direction,Weapon)
    local Bullets = ReplicatedStorage.Bullets[Weapon].Bullet:Clone()
    Bullets.Parent = workspace
    Bullets.CFrame = CFrame.new(Position)
    local BodVel = Instance.new("BodyVelocity",Bullets)

end)```

```lua
--ShootingPart is the muzzle
RS.RemoteEvent.Shooting:FireServer(framework.viewmodel.ShootingPart.Position,framework.viewmodel.ShootingPart.CFrame.LookVector,framework.viewmodel.Name)
--Value passed
rustic plank
#

look at the video, the bullets just dont want to spawn at the exact position

twin crest
rustic plank
#

@untold saffron

twin crest
#

then js get the guns position

rustic plank
#

did that

#

the bullets

#

have autism

twin crest
#

💔

rustic plank
#

The bullets

#

seem to always

#

spawn below me

#

undermap

#

@proud arch sry to ping, u mind to help?

rustic plank
#

@dire linden

#

please help?

dire linden
#

Bullets.Position = Position

#

Youre applying Position to CFrame which is both position and orientation.

#

And shit.

rustic plank
#

position is a vector3

rustic plank
dire linden
proud arch
proud arch
#

Oh unless you're trying to get bullet spawn position from the server

I think this is more of a situation where you need to rethink how you handle this

When I made an FPS system, I used FastCast to cast a cosmetic bullet on the client. I'd tell the server where I think I was aiming at.

The server would fire an invisible bullet to do actual hit detection. The server would tell everyone else that the shot happened

All other clients create their own cosmetic bullet

rustic plank
#

@proud arch , FastCast wont visualize it.

proud arch
rustic plank
#

Let me send u the vid

proud arch
rustic plank
#
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Shooting = ReplicatedStorage.RemoteEvent:WaitForChild("Shooting")
local FastCast = require(ReplicatedStorage.Modules.FastCastRedux)

local caster = FastCast.new()

caster.VisualizeCasts = true

Shooting.OnServerEvent:Connect(function(player,Pos,Direction,Weapon,Camera)
    local Position = Pos
    local Direction = Direction
    caster:Fire(Position,Direction,10)
end)```
rustic plank
#

FastCast wont visualize

proud arch
#
  1. Create FastCastBehavior object
  2. Pass to Fire function after velocity.
rustic plank
#

Oh yea my bad, I do caster.VisualizeCasts = true not FastCast.VisualizeCasts = true