Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 4 years ago
Edited 4 years ago

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)
0
Why not just leave it visible in studio? JailBreaker_13 350 — 4y
0
Is ScreenGui.Enabled == true? AntiWorldliness 868 — 4y

1 answer

Log in to vote
1
Answered by 4 years ago

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)
Ad

Answer this question