Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

I made a script when a player joins a GUI is visible but it does not pop up?

I made a script when a player joins a GUI is visible but the GUI does not pop up?

local Frame = script.Parent
game.Players.PlayerAdded:Connect(function()
	Frame.Visible = true
end)

2 comments

0

Why not just leave it visible in studio?

0

Is ScreenGui.Enabled == true?

1 answer

✓ Accepted answer

I had a very similar problem. This is what I came up with make a part and then put it over spawn and edit the script.

script.Parent.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") then
		local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
		if plr then
			if not plr.PlayerGui:FindFirstChild("GUIClonedfromtouchblock") then
				local clonedgui = script.Parent:FindFirstChildOfClass("ScreenGui"):Clone()
				clonedgui.Name = "GUIClonedfromtouchblock"
				clonedgui.Parent = plr.PlayerGui
				wait(2)
				script.Parent.TouchEnded:Connect(function(hit2)
					if hit == hit2 then
						game.Debris:AddItem(clonedgui,0)
					end
				end)
			end
		end
	end
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.