Player = script.Parent.Parent mouse = Player:GetMouse()
function onKeyDown(key) key = key:lower() if key == "f" then x = Instance.new("Part") x.BrickColor = BrickColor.new("Bright red") x.Size = Vector3.new(10, 10, 10) x.TopSurface = "Smooth" x.BottomSurface = "smooth" x.Shape = "Ball" x.Transparency = 0.7 y = Instance.new("BodyVelocity") y.maxForce = Vector3.new(math.huge, math.huge, math.huge) y.Velocity = Player.Character.Torso.CFrame.lookVector *80 x.Parent = Workspace y.Parent = x f = Instance.new("Fire",x) f.Size = 12 f.Heat = 0 game.Debris.AddItem(x, 6) end end
mouse.KeyDown:connect(OnKeyDown)
19:16:24.821 - Attempt to connect failed: Passed value is not a function 19:17:14.066 - attempt to call a nil value

1 comment
Just a tip, theres a blue button above the text box that says "Lua" when posting question. You can paste all your code inside the little area it creates. It makes it much easier to read the code. :)