I have a promity prompt, but it won’t trigger, even though I’m activating it.
I don’t know if this is a problem with the script or if its a bug.
It’s not even throwing an error.
Images:
I have a promity prompt, but it won’t trigger, even though I’m activating it.
I don’t know if this is a problem with the script or if its a bug.
It’s not even throwing an error.
Images:
Is this a server script? LocalScripts are only being executed when parented under certain things.
The problem can also be caused because of script running before the game fully loaded, resulting in error:
local gate = game.Workspace:WaitForChild("gate") -- I added here
print(gate)
local gswitch = game.Workspace:WaitForChild("Switch") -- and here
print(gswitch)
local gprox = gswitch.Main.Attachment.Prompt
print(gprox)
print(gprox.Parent.Parent)
local goc = false
gprox.Triggered:Connect(function()
print("YES")
print(goc)
local energylevel = 3 -- the script did caused error on the next line as there was no variable energylevel
if energylevel > 0 then
end
end)
Here is the video of it:
Oh! Nevermind. It works. It just so happened that there was a while true loop in the script above where I had that triggered function.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.