Thank You So Much
2 Likes
You could actually get to know if its an error because the code can’t find the Instance yet, it would say Attempt to index nil
, or something similar to that in the output console.
1 Like
where the output console? i new scripting
1 Like
Go to the View Tab from the top bar, and then Output. It will show all the print, warnings or error messages in there. And helps you alot in debugging
2 Likes
Totally agree, you can do:
local Head = char:WaitForChild("Head", 30) -- You don't have to put 30 seconds, but it's better to yield less.
if Head then
-- Gui insertion here
end
To prevent errors with nil instances, the code above would be the best solution.
3 Likes