Im trying to make an axe work with proximity prompt,
How this works :
I have made a tree in roblox studio, When you trigger the proximity prompt it gives you a tool called wood, the tree goes to replicated storage and then back to workspace after a few seconds, you can get stone to make an axe and when you have the axe, I want to make the tree cutting become faster, Here is 2 scripts I made but none worked
script 1
local Tree = game.Workspace.Trees.GroupOfTrees.Tree.Wood.ProximityPrompt
script.Parent.Equipped:Connect(function()
Tree.Triggered:Connect(function()
Tree.HoldDuration = 5
if script.Parent.Unequipped then
Tree.HoldDuration = 10
end
end)
end)
script 2
local Tree = game.Workspace.Trees.GroupOfTrees.Tree.Wood.ProximityPrompt
if script.Parent.Equipped and Tree.Triggered then
Tree.HoldDuration = 5
if script.Parent.Unequipped and Tree.Triggered then
Tree.HoldDuration = 10
end
end
the scripts are in the tool, and the tool is in replicated storage, when you craft it it clones and goes to the player inventory.
How do I make this work?