Hey, so I am working on a horror game for someone, and I am trying to make a door with a proximity prompt that when activated, it enables a GUI that says the Door is locked, but the script does not work.
I used the same structure of script for another door, that teleports you instead of saying its locked, and it worked, but this one does not? I dont know why, I used the same structure for both scripts, I am baffled and confused.
The only other instance that I could see is that you haven’t assigned your GuiObjects correctly if the script didn’t work if it didn’t work on a Server Script
The thing is @OP didn’t really specify if the regular script didn’t work with his old code or my code. If it’s my code then it’s probably a gui issue, although it would’ve errored for him if it was, so best I can assume is that he hasn’t tried my script in a regular script or gui name issue
Okay may we see where your script is located i nthe explorer? The only thing I can think off is that the name is incorrect or you’re still using a localscript
local Proximity = script.Parent
local Player = game.Players.LocalPlayer
local gui = Player.PlayerGui
local UI1 = gui:FindFirstChild("DoorLocked")
Proximity.Triggered:Connect(function(player)
UI1.Enabled = true
wait(2)
UI1.Enabled = false
end)