Edit: Issue solved. I literally just made it go off screen when non visible, and deleted the reparent script, and the tween it already had brings it back on screen.
So, I’m working on a gui and I’ve made a SetParent Script to, well, set the parent.
I’m reparenting a gui to playerscripts. script.Parent reffering to the parent of the script, so script.Parent.Parent = (instance) to change the script’s parent’s parent. I’m still working on the gui but I want to be able to have it in the playerscripts, where it goes, to work for the shop. But I want it to be testable without repeatedly moving it.
I’m slightly confused, but a simpler way of doing what I believe you want to do is by putting the screen gui Instance inside of one of the local scripts. that way, you can easily call on it via local Gui = script:FindFirstChildOfClass("ScreenGui"):Clone() -- or obviously just the name of the ScreenGui
Gui.Name = "Test"
then from there, if you want to move it, to and from the players view, you can do
Gui.Parent =game.Players.LocalPlayer.PlayerGui
OR
game.Players.LocalPlayer.PlayerGui:FindFirstChild("Test"):Destroy() to remove it
What it sounds like you want to do is have the shop “pop up” when the player triggers it, and remove it when the player disengages with it, is that correct?
Its coded to be inside the local script. But, I’m still working on the gui so I’ve had it in startergui. This ascript is to make it easier where I don’t have to keep moving it (especially sincee moving it will glitch it out and shrink it sometimes)
no, i need to be able to see the gui. i need to move it to startergui to see it. i know of this feature. it can’t be in startergui for the code, but it needs to for me to edit the gui look.