Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

why is my proximityprompt not firing?

Asked by 2 years ago

There's a part in my game's workspace with a proximity prompt inside it, as well as a script.

This script detects when the player fires the proximity prompt and copies a tool in replicated storage and puts it in the local player's backpack, however that does not happen when the proximityprompt is triggered. There's no errors either so I don't know what exactly I got wrong in my script.

local RS = game:GetService("ReplicatedStorage")
local Item = RS.AlmondWater

local itemPrompt = script.Parent.CanPrompt

itemPrompt.Triggered:Connect(function(player)
    local itemClone = Item:Clone()
    itemClone.Parent = player.Backpack

    script.Parent:Destroy()
end)

Thank you in advance.

1
if you write `itemClone.Parent = workspace`, do you see the tool in Workspace after triggered? imKirda 4491 — 2y
0
tring to make a backrooms game huh guardian_stone 12 — 2y
0
ye lol also there was no issue I was just activating the wrong proximityprompt since I copied and pasted a broken one, and now I can't delete this original post lol ABDJackioZoAlt1 37 — 2y

Answer this question