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

My Gui's are not opening when ever I begin the game?

Asked by 3 years ago

So I am remaking old egg hunt games every time I want enable the ScreenGui it never works. Same thing for the Frame. I would say local Frame = game.StarterGui.ScreenGui.Frame Frame.Visible = true. When I went to the properties of the Frame or ScreenGui it was always Visible or enabled but the UI it self was not. Not to mention Roblox also would not give me any errors in the output. Can some one explain what I did wrong.

local eggs = game.workspace.Eggs:GetChildren() local Gui = game.StarterGui.ScreenGui.Frame Instance.new("BlurEffect", game.workspace.Camera) local blur = game.workspace.Camera.Blur local eggsFound = {}

blur.Enabled = false

local plr = game.Players.LocalPlayer

local char = plr.Character or plr.CharacterAdded:Wait()

local humanoid = char:WaitForChild("Humanoid")

humanoid.Touched:Connect(function(touch)

for i, egg in pairs(eggsFound) do

    if egg == touch then return end 
end

if touch.Name == "Egg" then

    Gui.Visible = true 
    blur.Enabled = true


    end     
end)
0
I think local Gui = game.StarterGui.ScreenGui.Frame does it on serverside because StarterGui is used to replicate to each player in PlayerGui so local Gui = plr.PlayerGui.ScreenGui.Frame should work better, if I understand the problem correctly JohnerDev 27 — 3y
0
He's right, it's supposed to be plr.PlayerGui.ScreenGui.Frame since everything in StarterGui will be move to the player's PlayerGui realchricrocgamer 15 — 3y

Answer this question