local Ball = game.Workspace.Ball
local UIS = game:GetService("UserInputService")
local Fire = game.ReplicatedStorage.Fire
local Player = game.Players.LocalPlayer
local Character = Player.Character
BodyVelocity = Instance.new("BodyVelocity")
BodyVelocity.Parent = Ball
Ball.Parent = game.Workspace
local Mouse = game.Players.LocalPlayer:GetMouse()
UIS.InputBegan:Connect(function(input) if input.KeyCode == Enum.KeyCode.E then local Character = Player.Character Ball.Shape = Enum.PartType.Ball if Character then Ball.CFrame = Player.Character.HumanoidRootPart.CFrame*CFrame.new(0,0,-2) Fire:FireServer(Mouse.Hit.p) end end end)
that's the localside and the server side is local BallofFire = game.StarterPlayer.StarterPlayerScripts.BallofFire Fire = game.ReplicatedStorage.Fire local UIS = game:GetService("UserInputService")
Ball = game.Workspace.Ball
Ball.Parent = workspace
BodyVelocity = Instance.new("BodyVelocity") BodyVelocity.Parent = Ball
Fire.OnServerEvent:Connect(function(PlayerWhoFired, MousePosition) for i = 1,9 do
Ball.Anchored = true
Ball.CanCollide = false
Ball.Transparency = 0.5
BodyVelocity.MaxForce = Vector3.new(20,20,20)
BodyVelocity.Velocity= Vector3.new(MousePosition -PlayerWhoFired.Character.PrimaryPart.Position.Unit*30)
wait()
end
end) theres a remoteevent obviously but I cant make the fireball to shoot why?(I treid debugging it)
