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

function PlayerAdded not working?

local top = script.Parent.BlackBars.TopBar
local bottom = script.Parent.BlackBars.BottomBar
local info = script.Parent.BlackBars.Info
local date = script.Parent.BlackBars.Date

game.Players.PlayerAdded:Connect(function()
		wait(2.5)
	date.Visible = true
		wait(1.5)
	info.Visible = true
		wait(4.5)
	top:TweenPosition(UDim2.new(0,0, -0.379,0), "Out", "Quad", 3)
	bottom:TweenPosition(UDim2.new(0,0, 0.91,0), "Out", "Quad", 3)
end)

Basically, I'm trying to make it so whenever a player joins, the date will be visible, then info, then the cinematic bars will tween into their positions.

1 answer

Try using local scripts on starterplayerscripts, If i understand right, Make like that :

Put an screen gui on starter gui then make it two bars , One will be the top Named "TopBar" and the "BottomBar" that will be the bottom obviously then put the local script on starterplayerscripts and make the screen gui bars be outside the screen so we can make the tween effect then put this code

local ScreenGui = game.Players.LocalPlayer.PlayerGui:WaitForChild("Gui") -- Change GUI to the screen gui name

local TopBar = ScreenGui:WaitForChild("TopBar")
local BottomBar = ScreenGui:WaitForChild("BottomBar")

wait(Put any value here)

ScreenGui.Enabled = true

wait(Put any value here)

TopBar:TweenPosition(UDim2.new(0,0, -0.379,0), "Out", "Quad", 3)
BottomBar:TweenPosition(UDim2.new(0,0, 0.91,0), "Out", "Quad", 3)

Tell me if this worked

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