RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"write me a roblox script that shows the players center of mass when it is executed"
-- local script local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local function showCenterOfMass() local humanoid = character:WaitForChild("Humanoid") local centerOfMass = humanoid.RootPart.CFrame:ToWorldSpace(humanoid.CenterOfMass) local centerOfMassPart = Instance.new("Part") centerOfMassPart.Name = "CenterOfMass" centerOfMassPart.Shape = "Ball" centerOfMassPart.Size = Vector3.new(1, 1, 1) centerOfMassPart.Position = centerOfMass.p centerOfMassPart.BrickColor = BrickColor.new("Bright red") centerOfMassPart.Anchored = true centerOfMassPart.CanCollide = false centerOfMassPart.Parent = character wait(5) centerOfMassPart:Destroy() end showCenterOfMass()