im trying to make that when a billboard guiisnt visible another billboardgui will be visible
the problem is that nothing happens when the billboardgui isnt visible and the print isnt working either.
there are no errors
local Player = game:GetService('Players').LocalPlayer
Player.CharacterAdded:Wait()
local Inv2 = script.Parent.Parent.Inv2
local Inv3 = script.Parent.Inv3
local Inv4 = script.Parent.Parent.Inv4
game:GetService("RunService").RenderStepped:Connect(function()
if Inv2.Visible == false then
Inv3.Visible = true
print("working")
else
Inv2.Visible = true
Inv3.Visible = false
end
end)
Are you sure there’s no errors? I’d assume the script would still be repeating itself if it would still be working (If not, just check your Output or change the script to a LocalScript if you haven’t already)
Or add a couple more prints to check what exactly works
Can you show us the location of the script in the Explorer? Do you want the BillboardGui’s visibility to show to all players (use a Script) or only to the LocalPlayer/Client (use a LocalScript)
local Player = game:GetService('Players').LocalPlayer
Player.CharacterAdded:Wait()
print("charAdded")
local Inv2 = script.Parent.Parent.Inv2
local Inv3 = script.Parent.Inv3
local Inv4 = script.Parent.Parent.Inv4
game:GetService("RunService").RenderStepped:Connect(function()
if Inv2.Visible == false then
Inv3.Visible = true
print("working")
else
Inv2.Visible = true
Inv3.Visible = false
end
end)
print("RenderStepped")
In order for your script to work you first need to remove the “Player.CharacterAdded:Wait()” Since it just stops your script from working completely as it just waits there.
Then do something like this or something. RunService triggers everytime theres movement meaning that too much changes will cause it to crash. So waits are needed, and you would have to change some values to true or false later on otherwise it would just be one thing always visible as there are no changes.
That would mean, Your billboard Gui or whatever it is called “Inv2” isn’t part of PlayerGui meaning it doesn’t exist. I was wondering earlier but your Inv2 and Inv4 both have an extra parent in it while Inv3 only has 1.