localscript:
PlayerMouse.Button1Down:Connect(function()
Grab:FireServer(PlayerMouse.Hit)
end)
script:
Grab.OnServerEvent:Connect(function(Player,MouseHit)
local player = game.Players:FindFirstChild(Player.Name)
local goal = {}
goal.CFrame = MouseHit
print(MouseHit) --prints like this (-13.9006186, 25.3789997, -92.6054611, 0.990065277, 0.0217962265, 0.138909042, -8.90251249e-06, 0.987922072, -0.154951453, -0.140608668, 0.153410822, 0.978107512)
local tween = TweenService:Create(player.Character.HumanoidRootPart.CFrame, tweenInfo, goal)
tween:Play()
end)
Error: Unable to cast value to Object