I'm trying to make them not equip

Hey so right now I’m trying to make a script where when you activate a proximity prompt it gives you a tool. Simple right? Yeah, but the issue im having is that there is multiple tool givers and they can equip multiple tools at once.

So what I’m asking is, how do I make it so when they get it it doesn’t automatically equip.

Heres the code:

local PlayerService = game:GetService('Players')

local Potion = game.ServerStorage.Tools.BodySwapPotion

local Prompt = script.Parent.ProximityPrompt

Prompt.Triggered:Connect(function(Player)
	local Character = Player.Character or Player.CharacterAdded:Wait()
	local Potion = Potion:Clone()
	Potion.Handle.Anchored = false
	Potion.Handle.CanCollide = false
	Potion.Parent = Character
end)

Thanks for helping!

local PlayerService = game:GetService('Players')

local Potion = game.ServerStorage.Tools.BodySwapPotion

local Prompt = script.Parent.ProximityPrompt

Prompt.Triggered:Connect(function(Player)
	local Character = Player.Character or Player.CharacterAdded:Wait()
	local Potion = Potion:Clone()
	Potion.Handle.Anchored = false
	Potion.Handle.CanCollide = false
	Potion.Parent = Character.Player.Backpack -- what i changed
end)

I think this is what you mean? Reply if it is not!

1 Like
local PlayerService = game:GetService('Players')

local Potion = game.ServerStorage.Tools.BodySwapPotion

local Prompt = script.Parent.ProximityPrompt

Prompt.Triggered:Connect(function(Player)
	local Potion = Potion:Clone()
	Potion.Handle.Anchored = false
	Potion.Handle.CanCollide = false
	Potion.Parent = Player.Backpack
end)
1 Like

No, thanks for the help, but I mean when you obtain the tool it automatically selects it so you can have multiple tools selected at once.

if you move it into backpack instead of character it is not auto equipped

Sorry, I forgot to check out your script. Didn’t see it! Doing it right now…

EDIT: Yeah it works, thanks! I’ll mark it as the solution.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.