I’m making a script where when the proximity prompt is triggered it “harvests” the crop. using this code
local prox = script.Parent.Hitbox.ProximityPrompt
prox.Triggered:Connect(function(player)
local Wheat = game.ServerStorage.ItemsFolder.Wheat
local wheatPlot = script.Parent
local String = Instance.new('StringValue')
Wheat.Handle.Transparency = 0
Wheat.Part.Transparency = 0
Wheat.Part1.Transparency = 0
Wheat.Part2.Transparency = 0
Wheat.Part3.Transparency = 0
Wheat.Handle.Anchored = false
Wheat.Part.Anchored = false
Wheat.Part1.Anchored = false
Wheat.Part2.Anchored = false
Wheat.Part3.TAnchored = false
String.Name = 'Wheat'
String.Parent = player:WaitForChild('Inventory')
Wheat.Parent = player.Backpack
wheatPlot:Destroy()
end)
When i tested it. Nothing happened. I thought it was a little error so i tried using prints to find the line that was wrong since it didn’t give an error but I looked into it more and found out the script can’t even find the proximity prompt
Whats going on???