Hey, I am trying to make it so a proximityprompt triggers and fires a remoteEvent. However, nothing prints and nothing happens when I trigger the prompt.
This is in a localscript by the way, in a part which a proximityprompt is in aswell.
My code:
local part = script.Parent
local replicatedStorage = game:GetService("ReplicatedStorage")
local pickupEvent = replicatedStorage.CollectedFurniture
local proxPrompt = part.ProximityPrompt
local starterGui = game:GetService("StarterGui")
local gui = starterGui.CurrencyGUI
local furnitureframe = gui.FurnitureHolder.FurnitureFrame
local amount = furnitureframe.Amount
local Backpack = gui.LocalScript
script.Parent.ProximityPrompt.Triggered:Connect(function(plr)
print("Fired!")
if plr then
print("Fired2")
pickupEvent:FireServer()
end
end)
This may be a simple fix, but as you know I am a bad scripter. Thanks for any help!!