local enabled = true Player = script.Parent.Parent character = Player.CharacterAdded:wait(); mouse = Player:GetMouse() run = game:GetService("RunService") Torso = Player.Character.Torso function onKeyDown(key) key = key:lower() if key == "e" then f = Instance.new("Fire") f.Color = Color3.new(0, 85, 255) f.SecondaryColor = Color3.new(0, 170, 255) f.Size = 15 f.Heat = 25 f.Parent = Torso y = Instance.new("BodyVelocity") y.maxForce = Vector3.new(math.huge, math.huge, math.huge) y.velocity = Player.Character.Torso.CFrame.lookVector*80 y.Parent = Torso game.Debris:AddItem(f,4) game.Debris:AddItem(y,2) end end mouse.KeyDown:connect(onKeyDown)
two questions in the same hour....a new kind of low u.u
I can't give much more advice than what people have told you but I fixed it up for you
local enabled = true Player = game.Players.LocalPlayer while not Player.Character do wait(.03) end character = Player.Character mouse = Player:GetMouse() run = game:GetService("RunService") Torso = Player.Character:WaitForChild("Torso") function onKeyDown(key) key = key:lower() if key == "e" then local f = Instance.new("Fire") f.Color = Color3.new(0, 85, 255) f.SecondaryColor = Color3.new(0, 170, 255) f.Size = 15 f.Heat = 25 f.Parent = Torso local y = Instance.new("BodyVelocity") y.maxForce = Vector3.new(math.huge, math.huge, math.huge) y.velocity = Player.Character.Torso.CFrame.lookVector*80 y.Parent = Torso game.Debris:AddItem(f,4) game.Debris:AddItem(y,2) end end mouse.KeyDown:connect(onKeyDown)