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)
4 comments
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.
isnt raycasting only for rays?
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.
Set the position (cframe) of the fireball to your hands before using it