You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I am making a soccer game, when you touch a loose ball, you gain possession. -
What is the issue? Include screenshots / videos if possible!
Upon touching a loose ball, on your screen it’s welded to you and you can move freely, but on the screen of others you and the ball freeze in place. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Going over code/searching.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
Part that collects ball
while task.wait() do
if BALL.CanSteal.Value == true then
local headerParts = workspace:GetPartBoundsInRadius(BALL.Position, 6)
for index, headerPart in pairs(headerParts) do
if BALL.InPossession.Value == false and BALL.Parent == workspace and BALL.Position.Y >= 3 and headerPart.Parent:FindFirstChild("Humanoid") and headerPart.Parent:FindFirstChild("Humanoid").FloorMaterial == Enum.Material.Air then
game.ReplicatedStorage.Sounds.Header:Play()
BALL.AssemblyLinearVelocity = Vector3.new(headerPart.Parent:WaitForChild("HumanoidRootPart").CFrame.LookVector.X, 4, headerPart.Parent:WaitForChild("HumanoidRootPart").CFrame.LookVector.Z) * 20
BALL.CanSteal.Value = false
task.wait(1)
BALL.CanSteal.Value = true
elseif BALL.InPossession.Value == false and BALL.Parent == workspace and BALL.CanSteal.Value == true and headerPart.Parent:FindFirstChild("Humanoid") then
BALL.InPossession.Value = true
BALL.PossessorName.Value = headerPart.Parent.Name
local motor6D = Instance.new("Motor6D")
motor6D.Part0 = headerPart.Parent:WaitForChild("HumanoidRootPart")
motor6D.Part1 = BALL
motor6D.Parent = headerPart.Parent:WaitForChild("HumanoidRootPart")
motor6D.Name = "Ball"
BALL.Parent = headerPart.Parent
end
end
end
end
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.