Click Button to drop a part

I’m trying to figure out how i could make a system whenever i press a button on my gui a part drops in front of my character (kinda like a drop system)
But i do not know how i could do this.

Thanks in advance for the help!

When you click it un-anchors the part.

Like mousebutton1:fire or something idk im not a scripter

No, i mean like whenever you click the button it clones a part from Serverstorage and drops it in front of the player who clicked the button.

Then I don’t know how to help, sorry.

Local script in drop button


Server script in ServerScriptService

local part = game.ServerStorage:FindFirstChild("Your part"):Clone()
part.Parent = workspace
part.CFrame = player.Character.HumanoidRootPart.CFrame
print("Part dropped")

^^^ This script is going to place it right where the humanoidrootpart of the player is. Using CFrame, you can position it specifically how you want it. maybe and then it’s like unanchored and drips from a certain part?

Just edited it so it clones the part from server storage*

You could use a Remote event that fires when the player presses the button.

A server script will then use something like this:

local Part =  game:GetService("ServerStorage").Part
local event =  game:GetService("ReplicatedStorage").RemoteEvent -- the remote event must be in the replicated storage to work

    Part:Clone().Parent = workspace

Thank you! This works perfectly.

1 Like