SCRIPT 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(100,100,100) bv.Velocity = Vector3.new(100,100,100) Chr = playear.Character Root = Chr.RightHand part.Position = Root.Position part.CanCollide = false part.Position = input end)
LOCAL SCRIPT Plr = game.Players.LocalPlayer Mouse = Plr:GetMouse() game:GetService("UserInputService").InputBegan:Connect(function(input,Games) if input.KeyCode == Enum.KeyCode.M then game.ReplicatedStorage.Remotes.CrystalPowerMoves:FireServer(Mouse.Hit) end end)
The problem is here that on the server you're doing part.Position = input
when input
is a CFrame
and not a Vector3
. input
is a CFrame
because it's the result of Mouse.Hit
which is a CFrame. You can fix this by changing the line to part.Position = input.Position
which will set the position of the part to the positional property of the cframe.