Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

(?) "Bullet is not a valid member of CFrame"

I am trying to make it fire a projectile with this script

local player = game.Players.LocalPlayer local tool = script.Parent local Char = player.Character

function GetBullet() local Bullet = Instance.new("Part",workspace) Bullet.FormFactor = "Custom" Bullet.Size = Vector3.new(1,1,1) Bullet.BrickColor = BrickColor.new("Purple") Bullet.CanCollide = false Instance.new("BodyVelocity",Bullet) return Bullet

end

tool.Equipped:Connect(function(mouse) mouse.Button1Down:connect(function() local mH = mouse.hit local Bullet = GetBullet() Bullet.CFrame = tool.Handle.CFrame * CFrame.new(Char.UpperTorso.CFrame.lookVector * 2) Bullet.CFrame = CFrame.new(Bullet.Position, mH.Bullet) Bullet.BodyVelocity.velocity = Bullet.CFrame.lookVector * 120 --Speed Of Bullet Bullet.Touched:connect(function(hit) local humanoid = hit.Parent:FindFirstChild("Humanoid") if humanoid then humanoid:TakeDamage(50) end end) end) end)

It says "Bullet is not a valid Member of CFrame"

1 comment

0

Can you use lua blocks instead of text blocks? It's all minified...

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.