#Deleting the gui from the playergui
1 messages · Page 1 of 1 (latest)
why are you using findfirstchild
don't know gng. also tried waitforchild and then just a normal "."
i think there is no problem using any of them
but you already used a wait forchild for it
on the first line
so you can just use .
and i cant see why it is not working
local switch = script.Parent.ClickDetector
switch.MouseClick:Connect(function(plr)
if plr.PlayerGui:WaitForChild("ScreenGui").Parent == plr.PlayerGui then
print("found the gui")
plr.PlayerGui:FindFirstChild("ScreenGui"):Destroy()
end
script.Enabled = false
end)
i tried doing that and it is working
it is literally the same as yours
i mean i can record you a video that it's not working
sure
alright
will try, wait
and t ell me what happens
why the fuck does it work when i put the prints away
so it is destroying
yeah
do you have sure it is the right gui?
out of nowhere apparently
no like, it's doing what it's supposed to do
but only after i put the prints away
no problerm
why ever would this be useful
also
plr.PlayerGui:WaitForChild("ObjectiveGui").Parent == plr.PlayerGui
doesn't make sense
chill out unc
it works anyway
I am, I was wondering for what you need it and not trying to be rude 😭
oh sorry
i am making it so it deletes the current objective and replaces it with another one