-I apologize if this post isn't structured correctly, I'm new-
I've made a crate, that when clicked places a tool version in the player's inventory, once they press Q it takes a physical version out of replicated storage at the tool's position
The crate that's in the workspace is identical to the one in replicated, and when you click on the crate in the workspace everything works fine, and when you press Q it "drops" the crate just fine however once cloned the click detector stops working I've made sure both crates are completely identical. I don't know if it matters but the crates are both unions
This is the part of the script in charge of cloning the crate out of replicated storage
(This is a local script)
local player = game.Players.LocalPlayer local mouse = player:GetMouse() local crate = game.ReplicatedStorage.Crate local handle = script.Parent.Handle game:GetService("UserInputService").InputBegan:connect(function (input, _) if input.KeyCode == Enum.KeyCode.Q then print("Dropped!") local newPart = crate:Clone() newPart.Parent = game.Workspace newPart.Position = handle.Position newPart.Orientation = handle.Orientation newPart.Pickup.Disabled = false script.Parent:Destroy() end end)
This is for picking up the crate, the script works just fine for the crate that's already in the workspace, but once cloned out of replicated the script no longer works
(This is a normal script)
local crate = script.Parent local invCrate = game.ReplicatedStorage["Light Crate"] script.Parent.ClickDetector.MouseClick:connect(function(player) print("Picked Up!") local newPart = invCrate:Clone() newPart.Parent = player.Backpack crate:Destroy() end)
I'm completely lost and any help would be much appreciated!
The problem is I'm trying to clone from a local script, so the cloned object cannot be recognized by the server, I have to figure out how to clone the part from a normal script in order for the click detector to still be functional