Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make this remote event fireball work and shoot out from my hand instead of a random place?

Asked by 5 years ago
Local script
Plr = game.Players.LocalPlayer


game:GetService("UserInputService").InputBegan:Connect(function(input,Games)
    if input.KeyCode == Enum.KeyCode.M then
        game.ReplicatedStorage.Remotes.CrystalPowerMoves:FireServer()
    end

end)

ServerScript
game.ReplicatedStorage.Remotes.CrystalPowerMoves.OnServerEvent:Connect(function(playear,input)
part = Instance.new("Part", workspace)
part.Shape = "Ball"
part.Size = Vector3.new(1,1,1)
part.Material = "SmoothPlastic"
part.BrickColor = BrickColor.new("White")
bv = Instance.new("BodyVelocity",part)
bv.MaxForce = Vector3.new(30,30,30)
Chr = playear.Character
Root = Chr.RightHand
part.Position = Root
part.CanCollide = false



end)



0
You could do an animation, but as it wouldn't likely help with the purpose in general, I would try using raycasting to help with your issue to shoot it out of the hand. Also, for it to shoot out of the right hand, you need to do Root.Position on line 12. Lugical 425 — 5y
0
isnt raycasting only for rays? User#22788 5 — 5y
0
It's used for gun scripting with bullets, and it basically applies to anything similar to that (I don't have much knowledge in the area), but it's not just for rays. Names don't give all. Lugical 425 — 5y
0
Set the position (cframe) of the fireball to your hands before using it gullet 471 — 5y

Answer this question