Hey, i have edited Friaza's fireball script witch only works in Studio, not in-game. Anyways, here's the script:
Player = script.Parent.Parent -- Gets LocalPlayer Character = Player.Character -- Gets Players Character Mouse = Player:GetMouse() -- Gets players Mouse function onKeyDown(key) key = key:lower() if key == "z" then x = Instance.new("Part") x.TopSurface = "Smooth" x.BottomSurface = "Smooth" x.Shape = "Ball" x.Transparency = .7 x.BrickColor = BrickColor.new("Bright red") f = Instance.new("Fire") f.Parent = x f.Size = 12 f.Heat = 0 y = Instance.new("BodyVelocity") y.maxForce = Vector3.new(math.huge, math.huge, math.huge) y.velocity = Character.Torso.CFrame.lookVector*80 y.Parent = x x.Parent = Workspace x.CFrame = Character.Torso.CFrame*CFrame.new(0, 0, -12) end end Mouse.KeyDown:connect(onKeyDown)
Please help!
On the first line, instead of putting,
Player = script.Parent.Parent
put this:
Player = game.Players.LocalPlayer
The difference between PlaySolo and In game is that In game, the character loads a little after the Player loads. In Playsolo, the character and Player load immediately. To fix this, we wait for the Character to load using repeat wait() until Player.Character
Player = script.Parent.Parent -- Gets LocalPlayer repeat wait() until Player.Character Character = Player.Character -- Gets Players Character Mouse = Player:GetMouse() -- Gets players Mouse function onKeyDown(key) key = key:lower() if key == "z" then x = Instance.new("Part") x.TopSurface = "Smooth" x.BottomSurface = "Smooth" x.Shape = "Ball" x.Transparency = .7 x.BrickColor = BrickColor.new("Bright red") f = Instance.new("Fire") f.Parent = x f.Size = 12 f.Heat = 0 y = Instance.new("BodyVelocity") y.maxForce = Vector3.new(math.huge, math.huge, math.huge) y.velocity = Character.Torso.CFrame.lookVector*80 y.Parent = x x.Parent = Workspace x.CFrame = Character.Torso.CFrame*CFrame.new(0, 0, -12) end end Mouse.KeyDown:connect(onKeyDown)