I am currently working on a game that relies on Proximity Prompts for interaction. All of a sudden, any new proximity prompts I create are not registering in the .Triggered event ProximityPromptService.PromptTriggered function. I have looked throughout the developer hub for help but nobody was experiencing my problem. I’ve tried copy-pasting the prompt scripts that worked on my past prompts without changing anything and the new one still didn’t function. I’ve also made it whenever the PromptTriggered function is triggered it prints the prompt that was triggered, and the new one doesn’t print when it is triggered. I don’t think adding my script here would be nessasary, but if you want me to post it just ask.
Are you cloning it into a new object/creating one everytime something is ran?
I create the new proximity prompt and script and put it in a part and have the script do
if prompt == script.Parent.UpPrompt then
--code
end
It’d still would be helpful to provide the script, it’s #help-and-feedback:scripting-support after all
It’s a bit long, pretty much an elevator door opening script
local downarrow = script.Parent.Decal
local downarrow2 = script.Parent.Parent.DownArrow
local tweenservice = game:GetService("TweenService")
local open = script.Parent.Parent.Parent.Elevator.ElevatorDoors.Open
local proximitypromptservice = game:GetService("ProximityPromptService")
proximitypromptservice.PromptTriggered:Connect(function(prompt, plr)
if prompt == script.Parent.UpPrompt then
prompt.Enabled = false
downarrow.Color3 = Color3.new(1, 1, 0)
downarrow2.Material = Enum.Material.Neon
wait(5)
local beep = game.ReplicatedStorage.Sounds.ElevatorBeep:Clone()
beep.Parent = downarrow2
beep:Play()
wait(1)
print("Checking for Open")
if open.Value == false then
print("Opening Doors")
local leftdoor1goal = {}
leftdoor1goal.Position = Vector3.new(script.Parent.Parent.ElevatorDoors.LeftDoor.Position.X, script.Parent.Parent.ElevatorDoors.LeftDoor.Position.Y, script.Parent.Parent.ElevatorDoors.LeftDoor.Position.Z - 2.99)
local leftdoor2goal = {}
leftdoor2goal.Position = Vector3.new(script.Parent.Parent.Parent.Elevator.ElevatorDoors.LeftDoor.Position.X, script.Parent.Parent.Parent.Elevator.ElevatorDoors.LeftDoor.Position.Y, script.Parent.Parent.Parent.Elevator.ElevatorDoors.LeftDoor.Position.Z - 2.99)
local rightdoor1goal = {}
rightdoor1goal.Position = Vector3.new(script.Parent.Parent.ElevatorDoors.RightDoor.Position.X, script.Parent.Parent.ElevatorDoors.RightDoor.Position.Y, script.Parent.Parent.ElevatorDoors.RightDoor.Position.Z + 2.99)
local rightdoor2goal = {}
rightdoor2goal.Position = Vector3.new(script.Parent.Parent.Parent.Elevator.ElevatorDoors.RightDoor.Position.X, script.Parent.Parent.Parent.Elevator.ElevatorDoors.RightDoor.Position.Y, script.Parent.Parent.Parent.Elevator.ElevatorDoors.RightDoor.Position.Z + 2.99)
local leftdoor1tween = tweenservice:Create(script.Parent.Parent.ElevatorDoors.LeftDoor, TweenInfo.new(1), leftdoor1goal)
local rightdoor1tween = tweenservice:Create(script.Parent.Parent.ElevatorDoors.RightDoor, TweenInfo.new(1), rightdoor1goal)
local leftdoor2tween = tweenservice:Create(script.Parent.Parent.Parent.Elevator.ElevatorDoors.LeftDoor, TweenInfo.new(1), leftdoor2goal)
local rightdoor2tween = tweenservice:Create(script.Parent.Parent.Parent.Elevator.ElevatorDoors.RightDoor, TweenInfo.new(1), rightdoor2goal)
leftdoor1tween:Play()
rightdoor1tween:Play()
leftdoor2tween:Play()
rightdoor2tween:Play()
open.Value = true
end
wait(10)
if open.Value == true then
local leftdoor1goal2 = {}
leftdoor1goal2.Position = Vector3.new(script.Parent.Parent.ElevatorDoors.LeftDoor.Position.X, script.Parent.Parent.ElevatorDoors.LeftDoor.Position.Y, script.Parent.Parent.ElevatorDoors.LeftDoor.Position.Z + 2.99)
local leftdoor2goal2 = {}
leftdoor2goal2.Position = Vector3.new(script.Parent.Parent.Parent.Elevator.ElevatorDoors.LeftDoor.Position.X, script.Parent.Parent.Parent.Elevator.ElevatorDoors.LeftDoor.Position.Y, script.Parent.Parent.Parent.Elevator.ElevatorDoors.LeftDoor.Position.Z + 2.99)
local rightdoor1goal2 = {}
rightdoor1goal2.Position = Vector3.new(script.Parent.Parent.ElevatorDoors.RightDoor.Position.X, script.Parent.Parent.ElevatorDoors.RightDoor.Position.Y, script.Parent.Parent.ElevatorDoors.RightDoor.Position.Z - 2.99)
local rightdoor2goal2 = {}
rightdoor2goal2.Position = Vector3.new(script.Parent.Parent.Parent.Elevator.ElevatorDoors.RightDoor.Position.X, script.Parent.Parent.Parent.Elevator.ElevatorDoors.RightDoor.Position.Y, script.Parent.Parent.Parent.Elevator.ElevatorDoors.RightDoor.Position.Z - 2.99)
local leftdoor1tween2 = tweenservice:Create(script.Parent.Parent.ElevatorDoors.LeftDoor, TweenInfo.new(1), leftdoor1goal2)
local rightdoor1tween2 = tweenservice:Create(script.Parent.Parent.ElevatorDoors.RightDoor, TweenInfo.new(1), rightdoor1goal2)
local leftdoor2tween2 = tweenservice:Create(script.Parent.Parent.Parent.Elevator.ElevatorDoors.LeftDoor, TweenInfo.new(1), leftdoor2goal2)
local rightdoor2tween2 = tweenservice:Create(script.Parent.Parent.Parent.Elevator.ElevatorDoors.RightDoor, TweenInfo.new(1), rightdoor2goal2)
leftdoor1tween2:Play()
rightdoor1tween2:Play()
leftdoor2tween2:Play()
rightdoor2tween2:Play()
open.Value = false
end
end
end)
you can tell I copied my previous script because it have downarrow variables despite being an up button
I have decided to change my system so it no longer requires the new proximity prompt, but helping here would still help for any later proximity prompts
I now have a very short script for a new proximity prompt, and the script isn’t printing “Chair Prompt Triggered” into the console. It is printing “Chair Prompt Script” though
print("Chair Prompt Script")
script.Parent.FinalPoint.ChairPrompt.Triggered:Connect(function()
print("Chair Prompt Triggered")
end)