#Need URGENT Help with local script proximity prompts Jesus Christ.

1 messages · Page 1 of 1 (latest)

keen blaze
#

Idc about how bad the code is I just need to urgently now why this won’t work with my local script, local script is in starterplayerscripts, and photo 2 that piece of code is repeated for all keys 24 times. PLEASE HELP ME, just tell me why this won’t work and the simplest way to fix

sterile lance
#

Why so serious where are you going that you need it urgently? And you dont specify the issue either

crimson eagle
#

it looks like you want to make it so that when you trigger one proximity prompt all the others get disabled unless im wrong?

#

to organize, id start by grouping all of the proxmity prompts in a folder and then reference those proximity prompts by calling get children on the folder

#

then you can create a function that disables all of the other proximity prompts except the one that you pass in as an argument

keen blaze
keen blaze
sterile lance
#

local ProximityPromptService = game:GetService("ProximityPromptService")

local proximityPrompts = ProximityPromptService:GetDescendants()

ProximityPromptService.PromptTriggered:Connect(function(prompt)
-- Disable all other proximity prompts
for _, otherPrompt in pairs(proximityPrompts) do
if otherPrompt ~= prompt then
otherPrompt.Enabled = false
end
end
end)

#

will this work?

#

since u are trying to disable all other prompts when u trigger one

keen blaze
crimson eagle
#

probably because they havent loaded in

#

you would need to use wait for child

stuck token
#

damn bro what is that

stray osprey
#

The syntax is correct and it's placed in starterplayerscripts so it should be working. Try adding a task.wait(1) after it's triggered. I don't really know what else you can do tbh

#

is there any other script which could be interfering maybe?

dim yewBOT
#

studio** You are now Level 1! **studio

hazy blaze
crimson eagle
#

yea i meant to say put it into a table i just kind of rushed into giving a solution

hazy blaze
keen blaze
dreamy bane
#

Is it sorted?

scarlet skiff
pallid olive
#

HOYL SHIT

keen blaze