UI and Camera Problems

It’s me again! With another problem!
So in my game, I’m trying to manipulate the camera during the title screen.
Here’s the plan:
(Game is loaded)
-Screen is blurred and tinted black-
-Text slowly drops in from the top-
-Start button appears-

I’m pretty sure I can script it so the button to start the game appears easy-peasy, but I can’t seem to get the camera stuff and UI “Animation” (It’s in quotes, because it’s literally just falling slowly from the top) to work correctly. Please help!
Oh yeah, here’s my script by the way

local camera = game.Workspace.CurrentCamera
local TitleScreen = game.StarterGui.TitleScreen.TextLabel
local Blur = game.Workspace.CurrentCamera.Blur
local ColorCorrection = game.Workspace.CurrentCamera.ColorCorrection

local function TitleScreen()
	Blur.Enabled = true
	ColorCorrection.Enabled = true
	TitleScreen.AnchorPoint = Vector2.new(0.5, 0.5)
	TitleScreen.Position = UDim2.new({0.032, 0},{-0.314, 0})
	TitleScreen:TweenPosition(UDim2.new({0.163, 0},{0.305, 0}))


Pretty sure that the positions in the parenthesis are all wonky. Not really sure how they work or why they’re there. Also, I didn’t put the script for the start button to appear yet.

ok, so first of all, when a player joins the game, you are changing things inside of the startergui. So instead change it from their playergui like this:

local REvent = --Will be explained later
local function TitleScreen(player)
	local TitleScreen = player:WaitForChild("PlayerGui").TitleScreen.TextLabel
	TitleScreen.AnchorPoint = Vector2.new(0.5, 0.5)
	TitleScreen.Position = UDim2.new(0.032, 0, -0.314, 0)
	TitleScreen:TweenPosition(UDim2.new(0.163, 0, 0.305, 0))

Also, you are trying to use currentcamera inside of a ServerScript, which is not possible as it can only be used inside of a local script, so instead make a RemoteEvent and have a local script like this:

local REvent = --the remote event location
	local Camera = workspace.CurrentCamera
	local Blur = Camera.Blur
	local ColorCorrection = Camera.ColorCorrection

	Blur.Enabled = true
	ColorCorrection.Enabled = true

Also, the UDim2 properties do not need a set of {}. So I went ahead and removed them.

1 Like

Thank you so much! But can you explain just a little bit what the AnchorPoint and Position are