I am trying to make a door go transparent the moment you trigger the proximity prompt, though I am having a bit of difficulty with it. The prompt itself won't even show up! I'm not sure if it's a problem with the script or something else. Any help is greatly appreciated!
local ProximityPromptService = game:GetService("ProximityPromptService")
local P = script.Parent
local Part1 = P.Parent.GarageDoor.Part1
local Part2 = P.Parent.GarageDoor.Part2
local garageOpen = false
local function onPromptTriggered(promptObject, player)
if garageOpen then
Part1.Transparency = 1
Part2.Transparency = 1
P.BrickColor = BrickColor.new(0, 255, 0)
P.ProximityPrompt.ObjectText = "Open"
else
Part1.Transparency = 0
Part2.Transparency = 0
P.BrickColor = BrickColor.new(196, 40, 28)
P.ProximityPrompt.ObjectText = "Close"
end
garageOpen = not garageOpen
end
This is a link to what the explorer tab looks like in case it is needed;
