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

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 ="BodyVelocity", Fireball)
    BodyVelocitySecond.MaxForce =, 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")

Answer this question