Bro, Can you share video of running new code just like you did previously?
I think I figured it out, I’m deleting the object through a local script.
Could that be the problem?
let my try delete this for server script
local FoundCheck
repeat
task.wait(1)
FoundCheck = Player.PlayerGui:FindFirstChild("NewItemHolder)
until not FoundCheck
And on what side is that module script running? Get by RunService:IsServer(), if it returns true, then it is On server, then yeah that’s the problem, if not then problem is something else.
Thats my code that you added a variable to
I havent even checked what you written
I think I know why, your adding “NewItemHolder” on a local script I believe and the server cannot see it.
I realized the problem, I delete the gui in the local script, and I need to delete the script in the server script after clicking the button.
How do I do it?
Use remote event, on local script fire it and on server script, listen to it, check who fired it and then delete that gui from players GUI folder.
Place in StarterGUI:
script.Parent.ChildRemoved(function(child)
if child.Name == "SCREENGUI_NAME_HERE" then
-- code here
end
end)
Explanation:
Script’s ChildRemoved event fires when a child of StarterGui is removed, or in your case, turns into “nil”.
I did it, yay :)))
tysm all who helped me, guys.
That’s one way too, but I think I’ve already fixed my problem.
Thanks for your help too!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.