Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

The Part (Fireball) is not BodyVeloticing where My Mouse Is?!

Asked by
EEnergy8 225 Moderation Voter
2 days ago
Edited 2 days ago

So the point is, when i Click Q, the Fireball should launch where my mouse is, but it's not doing that, it just disappears, no errors

Server Script

    local BodyVelocitySecond = Instance.new("BodyVelocity", Fireball)
    BodyVelocitySecond.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
    BodyVelocitySecond.Velocity = (MouseHit.p * 200)

Local Script

local UIS = game:GetService("UserInputService")

local Mouse = game.Players.LocalPlayer:GetMouse()
local MouseHit = Mouse.Hit

UIS.InputBegan:Connect(function(key, isTalking)
    if key.KeyCode == Enum.KeyCode.Q then
        print("q is pressed")
        game.ReplicatedStorage.deployFireball:FireServer(MouseHit)
    end
end)

Answer this question