Sorry lol, could you format your script using ``` before and after the script (so it’s easier for us to read)
I have formatted the script as you requested
I think I found the error. whenever you make the goal table, instead of saying ["Position"]
, make it just say Position = UDim2.new()
(and fill in the udim2 value)
I will try it and reply if this fixes it
Nope, the result is still the same, script gets stuck
Oh wait, I think the MainFrame variable just hasn’t loaded since you didn’t use :WaitForChild()
. At the top where you list your variables, make sure to use that to ensure that they aren’t nil.
As seen here:
local Gui = script.Parent
local MainFrame = Gui:WaitForChild("MainFrame")
local SurvivorList = MainFrame:WaitForChild("SurvivorList")
local GuiLabel = MainFrame:WaitForChild("TextLabel")
local oldtext = GuiLabel.Text
ok, I will try that, if it works, i will mark this as the solution, however, this seems unlikely as if this was the case, the script would error when it tried to set a nil value’s visible to true, it does not error
You cannot use TweenService
to tween GuiObjects
.
See GuiObject:TweenSize
and GuiObject:TweenPosition
instead
weird I have never seen anybody tweening guis like that, we are using :TweenPosition() or :TweenSize() for those purposes
Yes, it seems I was right, the problem still persists
You can use either for GuiObjects
I have made a game loading gui previously that used tweenservice and it worked correctly, I know about TweenSize and TweenPosition but I will try those nonetheless
Are there any errors in output? If so, screenshot/copy them here
And along with that, are your print debuggers actually printing anything?
No errors, which is why i posted the problem here, it seems to be a problem in the tweening part of the code.
But the script does indeed print B2 or B1 depending on the conditional statement but stops after that
While I appreciate you trying to help me, it seems you are making the same mistake I made before I read this article, it seems you don’t truly understand when to use :WaitForChild(), I would recommend reading this article as it explains the common mistakes most devs make when using this function:
Personally I dont put the
["Position"]
Have you tried taking it out and just doing
Position = Udim2.new()
Thats what I personally do.
Yes, I have tried that but still it doesn’t work.
How long did you wait for the script to work name a time.
Rounds in my game start after 60 seconds, take a further 15 seconds and then end after 90 seconds, the gui is supposed to show after a round has ended, waited so long another round started
Hello everyone, I appreciate all the help this post got and would like to say that the problem apparently went away after I reinstalled windows due to some issues, so I believe this was a network problem on my side and the script was working, thank you for helping.