Super werid bug, I think I know why it happens but don't know how to stop it

Watch this video for the breakdown:
robloxapp-20210816-2050246.wmv (6.8 MB)

As shown from the video it ends up not showing the gui again.

I realize you have to download video to watch is there a place i can put it for you to see without you downloading?

I think I know why I am having this problem as I had a similar one before.

Its because the GUI is in a local script not a script.

But I forgot if you could but Remote event fires in regular scripts. Anyways here’s the script.

LocalScript Child is the Yes Button:

local player = game.Players.LocalPlayer
local RemoteEvent = game.ReplicatedStorage.SecretStage1

script.Parent.MouseButton1Click:Connect(function()
	local Screen = player.PlayerGui["SecretStage1GUI"] -- ScreenGui name
	Screen.HaveCoins:TweenPosition(UDim2.new(0.253, 0, -1, 0), "In", "Back", 1, true)
	RemoteEvent:FireServer()
end)
1 Like

looks like it’s an issue with your .Touched function rather than the screenGui could you post that code?

1 Like

It’s the screengui,

I was having a similar problem where on the same thing you clicked ‘No’ and it would tween away and when you touched it again it wouldn’t pop up, so I made it a regular script and it pops up now, its a similar issue with the tweens.

1 Like

So can you put remote events in regular scripts?

1 Like

Once the tween has completed once you aren’t resetting the HaveCoins position back to it’s original position. When you hit the portal the second time the the gui object is already in that position.
Store it’s original position in a variable and set it before calling the tween.

local player = game.Players.LocalPlayer
local RemoteEvent = game.ReplicatedStorage.SecretStage1
local Screen = player.PlayerGui:WaitForChild("SecretStage1GUI") -- ScreenGui name
local origPos=Screen.HaveCoins.Position

script.Parent.MouseButton1Click:Connect(function()
	Screen.HaveCoins.Position=origPos
	Screen.HaveCoins:TweenPosition(UDim2.new(0.253, 0, -1, 0), "In", "Back", 1, true)
	RemoteEvent:FireServer()
end)

Oh I missed it, dang it.

Why did you delete it?

Convert your video to mp4. That plays natively in Discourse (devforum website software)

How would I do that?

Kind of not good with files and stuff.


google would be helpful

1 Like

When the player touches the teleporter, is the server or the client the one that tweens the frame onto the screen?

1 Like

Client, via a local script. Which I have explained above.

Actually, I didn’t mean to delete it. I’ve restored it.

1 Like

Its original position is off the screen at

Thanks it is processing will update once its done!

1 Like

So the .Touched event that triggers the GUI tween is located in a local script?

The file is too big…

Is there a way to solve that?

does it tell you that on multiple websites?

you could try to make the file size smaller, which is also on google

No that is in a script.

Let me get it for you.

To make it less confusing.

local part = script.Parent
local deb = false

part.Touched:Connect(function(hit)
	local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
	if not plr or deb then	return	end
	
	
	local Screen = plr.PlayerGui["SecretStage1GUI"] -- ScreenGui name
	if plr.leaderstats.Coins.Value < 150 then
		Screen.NotHaveCoins:TweenPosition(UDim2.new(0.253, 0, 0.294, 0), "In", "Back", 1, true)
		deb = true
		wait(1)
		deb = false
	elseif plr.leaderstats.Coins.Value >= 150 then
		Screen.HaveCoins:TweenPosition(UDim2.new(0.253, 0, 0.294, 0), "In", "Back", 1, true)
		deb = true
		wait(1)
		deb = false
	end
end)

No when I tried to put it on the forum post.

oh make the mp4 file size smaller then
like I said there are a lot of things on google that can be found by searching

1 Like