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

Not placing the GUI into the player?, no Errors

This is a regular script and I'm trying to make it place this GUI inside of the player once this function is ran. I have the function setup but this line of code is not working. http://prntscr.com/gcdgh9

script.Parent.Notifications:Clone().Parent = game.Players.player.PlayerGui

whole script is this

function Countdown(player)
	if script.Parent.Time.Value <= 60 then
		wait(1)
		script.Parent.Time.Value = script.Parent.Time.Value -1
		script.Parent.Text = "Time Remaining: "..script.Parent.Time.Value.." Seconds"
		if script.Parent.Time.Value == 0 then
			wait(0)
			if game.Workspace.Settings.Mines.Value == true then
				game.Workspace.Settings.Mines.Value = false
				script.Parent.Notifications.Frame.TextLabel.Text = "MINES ARE OPEN"
				script.Parent.Notifications.Frame.TextLabel.TextColor3 = Color3.new(85, 255, 0)
				script.Parent.Notifications:Clone().Parent = game.Players.player.PlayerGui
				game.Workspace.MinerGates.CanCollide.Value = false
				script.Parent.Time.Value = 60
				wait(3)
				game.StarterGui.Notifications:Remove()
			else
				game.Workspace.Settings.Mines.Value = true
				game.Workspace.MinerGates.CanCollide = true
				script.Parent.Time.Value = 60
				script.Parent.Notifications.Frame.TextLabel.Text = "MINES ARE CLOSED"
				script.Parent.Notifications.Frame.TextLabel.TextColor3 = Color3.new(255, 0, 0)
				script.Parent.Notifications:Clone().Parent = game.Players.player.PlayerGui
				wait(3)
				game.StarterGui.Notifications:Remove()
			end
		end
	end
end
--255, 0, 0

while wait() do
	Countdown()
end

1 answer

game.Players.player.PlayerGui Need to be game.Players[player].PlayerGui Don't forget to accept the answer if it helped

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