Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a part go to the players back pack?

Asked by 3 years ago

Im new and im trying to make a bowling ball that when you click the button the ball will spawn, and u click on the ball and it goes to the players back pack.

1 answer

Log in to vote
0
Answered by 3 years ago

``local button = script.Parent local ball = Instance.new("Part") local clicked = Instance.new("ClickDetector") clicked.Parent = ball local function click(player)

ball.Shape = "Ball"
ball.BrickColor = BrickColor.Blue()
ball.Parent = game.Workspace
ball.Position = Vector3.new(-40.204, 3.07, 8.481)

end button.ClickDetector.MouseClick:Connect(click) local function clickman(epik) local player = game.Players.LocalPlayer ball.Parent = player.Backpack end ball.ClickDetector.MouseClick:Connect(clickman)

Ad

Answer this question