Steal Basketball

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    PlayerA dribbles a basketball…PlayerB presses R when in stealing range then a reach animation plays and knocks the ball out Player A inventory
  2. What is the issue? Include screenshots / videos if possible!
    The ball won’t come out PlayerA Inventory when PlayerB presses R when in stealing range
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I haven’t had any solutions to fixing this
    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!
-- This is an example Lua code block

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.

What’s your current script? Also, have you tried using :Destroy()?

I’m goin to send my current script in a bit!! I have this one that works but when the humanoid walks into you it steals the ball from your inventory…but I want for the player to press R when in close range and steal it.

You could destroy the ball in player A’s inventory, then give it to player B.

When PlayerB steals the ball I want it to come out of PlayerA’s inventory and into the workspace

You could clone the ball into the workspace using :Clone()

You could make it so when you press R, you tell the server you did, and have it do a magnitude check on the distance of your player from the ball and if close enough it will set the balls parent from the player’s backpack to the workspace.

We need to see your scripts to be able to help you.

Alright guys I’m goin to send my script when I get home…Hopefully you’re all still here!!!

I figured it out!!! Thanks for responding!!!

1 Like