How would I make a tool dissapear from the players inventory, then place the tool onto a target part, preform an action, and then re-appear in the players inventory. This will all be done with a proximity prompt.
Issue: I cant get the function to change the position of the bucket. Video attached
I have tried parenting it to the workspace and making the bucket CFrame equal to the TargetPart CFrame. But nothing seems to work…
Script provided is a snippet of the one provided in the video.
local function onPromptActivated(player)
if not toolEquipped and player.Character and player.Character.Parent then
local tool = player.Character:FindFirstChild("Bucket")
local bottom = tool:FindFirstChild("Handle")
if tool then
print("Sucess!")
bottom.Anchored = true
tool.Parent = game.Workspace
tool.Grip = CFrame.new(targetPart.CFrame.Position)
end
end
end
prompt.Triggered:Connect(onPromptActivated)
Also this is my first post ever kek