I'm trying to script build and I have this script:
chr = workspace.supercoolguy53
mouse = game.Players.LocalPlayer:GetMouse()
part = Instance.new("Part",chr)
part.CanCollide = false
part.Anchored = true
part.BrickColor = BrickColor.White()
part.Transparency = .9
part.Size = Vector3.new(7,7,7)
mesh = Instance.new("SpecialMesh",part)
mesh.MeshType = "Sphere"
part.Touched:connect(function(p)
local h = p.Parent:FindFirstChild("Humanoid")
if h and h.Parent.Name ~= "supercoolguy53" then
h.Parent:Destroy()
end
end)
mouse.KeyDown:connect(function(key)
if key == 'q' then
wait()
local clone = part:clone()
clone.Parent = chr
clone.Name = 'part1'
wait()
for i = 1,500 do
game:GetService('RunService').RenderStepped:wait()
chr.part1.CFrame = chr.part1.CFrame.new(chr.Position + (chr.part1.CFrame.lookVector*.1))
end
end
end)
while game:GetService('RunService').RenderStepped:wait() do
part.CFrame = chr.Torso.CFrame
end
Everything works except for I can't shoot it. When you press q you're supposed to shoot where ever you're looking, this is my first time with this 'lookVector' thing and I don;t quite understand it. I get this error new is not a valid member

2 comments
It didn't shoot the way I was facing... It was shooting tho.
Well, that was a problem in your code. It should be fixed now.