PromptShown seems to not be working?

As the title says “PromptShown” seems to not be working for me, what am I doing wrong?

local proxy = script.Parent

proxy.PromptShown:Connect(function()
	script.Parent.Parent.Parent:WaitForChild("HoverHighlight").Enabled = true
end)

proxy.PromptHidden:Connect(function()
	script.Parent.Parent.Parent:WaitForChild("HoverHighlight").Enabled = false
end)

Is this a Script or LocalScript? PromptShown only fires for clients.

I tried both and they didn’t work

PromptShown only works on clients. LocalScripts also don’t run in workspace. Assuming this proximity prompt is coming from workspace, I would probably suggest adding a LocalScript to StarterGui and doing it from there instead:


local proxy = workspace["Proximity prompt goes here"]
local hoverHighlight = workspace["Hover highlight goes here"]

proxy.PromptShown:Connect(function()
	hoverHighlight.Enabled = true
end)

proxy.PromptHidden:Connect(function()
	hoverHighlight.Enabled = false
end)

2 Likes

but I am making multiple of these? So this would be quite the task.

you could use a for loop to go through all of them [and locate each piece based on name for example, local highlight = workspace:FindFirstChild(prompt.Name.. "_Highlight]

3 Likes

Alright thank you both! I’ll try these.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.