Proximity prompt that takes takes random wallet.value and players tools

Hello :wave:t5:, I’m trying to achieve a proximity prompt when a player does an animation Ex /me surrenders the animation begins and the proximity prompt is enabled allowing another person to “rob” him/her taking random amounts of money and some tools.

I tried searching youtube and the forums but couldn’t find anything

1 Like

Alright, so Im assuming that you are playing your animation with a script.

First make your proximity prompt and place it in replicated storage.

Inside of your script, make a clone of the proximity prompt and parent it to the player. That should be it

Heres an example
VVVVVVVVVVV

--Animation PLays part

local PPrompt = game.replicatedstorage.NameOfYourPrompt

PPrompt.Parent = script.parent --Add more parents based off your heirarchy

Let me know if it works or you need anything else :slight_smile:

1 Like
elseif string.match(msg,"texts") or string.match(msg,"texting") or string.match(msg,"Text") or string.match(msg,"Texting") or string.match(msg,"Texts") then
				local anim = Player.Character.Humanoid:LoadAnimation(script.texting)

				local sound = script.Sound:Clone()
				sound.Parent = Player.Character.Head
				sound:Play()
				game.Debris:AddItem(sound,sound.TimeLength)

				anim:Play()

yea, but the animation script is separated from the proximity prompt though

1 Like

No, the anim only plays once so it can be inside.
It would look like

local anim = Player.Character.Humanoid:LoadAnimation(script.texting)

				local sound = script.Sound:Clone()
				sound.Parent = Player.Character.Head
				sound:Play()
				game.Debris:AddItem(sound,sound.TimeLength)

				anim:Play()

                local PPrompt = game.replicatedstorage.NameOfYourPrompt
                PPrompt.Parent = script.parent --Add more parents based off your heirarchy
2 Likes

the proximity prompt isn’t showing i followed every step you told me to do
robloxapp-20220114-1952590.wmv (2.9 MB)

image

Is there an error showing? Can you screenshot it if there is?

Of your output, not the script

Can you also show your explorer and where the “me/texting” script is in the explorer?