Hello developers,
I have been working on a very basic mining system using proximity prompts,
when the player triggers the proximity prompt, the part will disappear into the server storage.
When I test the script, this appears in the output: Part is not a valid member of Workspace “Workspace”
--> Get Server Storage
local ServerStorage = game:GetService("ServerStorage")
--> Get The Part
local Part: BasePart = workspace:WaitForChild("Part", 1)
--> Get The Prompt
local Prompt: ProximityPrompt = Part:WaitForChild("Mine", 1)
--> Detect Prompt Triggered
Prompt.Triggered:Connect(function(player: Player)
print(player.Name .. " Has Mined The Part")
Part.Parent = ServerStorage
end)