I'm trying to make a fe gun but when I try to cframe it this happens script.
game.ReplicatedStorage.Shoot.OnServerEvent:connect(function(player, position) local s = require(game.ReplicatedStorage.GunData.FAMAS) if workspace[player.Name].Humanoid.Health <=0 then else -- local distance = (workspace.CurrentCamera.FAMAS.FAMAS.Flash.CFrame.p - position).magnitude local bullet = Instance.new("Part", workspace.Bullets) bullet.CFrame = CFrame.new(workspace.CurrentCamera.FAMAS.FAMAS.Flash.CFrame.p, position) * CFrame.new(0,0,-s.range/2) bullet.BrickColor = BrickColor.new("New Yeller") bullet.Size = Vector3.new(0.2,0.2,0.2) bullet.Material = "Neon" bullet.Name = "Bullet" bullet.Anchored = false bullet.CanCollide = false bullet.Locked = true end end)
Error
12:41:11.085 - ServerScriptService.Event:7: bad argument #2 to 'new' (Vector3 expected, got Object)
Can someone help :()