Gui indent for no reason

Hello! I am having an issue with my GUI being cropped into the middle of the screen randomly.
Now while the Rescale type is indeed set to crop, It only randomly does this. When I play test it has a 50 50 chance of working properly or not.

IgnoreGuiInsent is set to true.

Explorer Tab:
image

Script:

local Players = game:GetService("Players")
local Part = script.Parent
local UI = Part:WaitForChild("HoneyGui")

local TS = game:GetService("TweenService")

local Sound = Part:WaitForChild("Sound")
local Debounce = false

local tweenInfo = TweenInfo.new(5,Enum.EasingStyle.Linear,Enum.EasingDirection.In)

Part.Touched:Connect(function(Hit)
	if not Debounce then
		
		if Hit.Parent:FindFirstChild("Humanoid") then
			
			Debounce = true
			
			local Char = Hit.Parent
			local Hum = Char:FindFirstChild("Humanoid")

			local UIClone = UI:Clone()

			local Player = Players:GetPlayerFromCharacter(Char)
			local PlayerGui = Player:WaitForChild("PlayerGui")
			
			Sound:Play()
			
			for i,v in pairs(UIClone:GetChildren()) do
				if v:IsA("Frame") then
					TS:Create(v,tweenInfo,{BackgroundTransparency = 1}):Play()
				elseif v:IsA("ImageLabel") then
					TS:Create(v,tweenInfo,{ImageTransparency = 1}):Play()
				end
			end
			
			UIClone.Parent = PlayerGui
			Hum.WalkSpeed = 8
			task.wait(5)

			UIClone:Destroy()
			Hum.WalkSpeed = 16
			task.wait(5)
			Debounce = false
			
		end
		
	end
end)

Example of the issue:

Example of the correct result:

Could this just be a Roblox Studio Bug?

1 Like

I honestly don’t know. Try parenting the gui under starter gui, setting it up how you want it, and then toggle the enabled property of the screen gui when you want to turn it on/off? That may fix it. :smile:

1 Like

I’ll try doing this, I’ll keep you updated

Alright sounds good! I hope it works.

Well, I didn’t try it but when I put the Ui into the starter gui, I found that my Imagelabels have been set to Fit… I don’t know how. Sorry for wasting your time but I’ll award you the solution because you made me check, Thank you!

Ok! I’m just glad I could help. Your game looks very cool by the way!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.