Frame isn't the same as shown

I have a small problem with how a frame is shown in my game.

This is how roblox shows it initially before starting the game

And this is how it is shown in game when I tween it inside to make it visible.

I am currently using an AnchorPoint of 0.1,0.15 and these settings for the frame:
image

This is the code if anyone wants to replicate my problem

local player = game.Players.LocalPlayer
local frame = script.WinGui.Frame
local PlayerName = frame.Player
local ReactionTime = frame.Reaction
local rs = game:GetService("ReplicatedStorage")
local re = rs.WinGui1
local ts = game:GetService("TweenService")
PlayerName.Text = player.Name
frame.Position = UDim2.new(-0.35,-0.5)
frame.AnchorPoint = Vector2.new(0.35,0.5)
wait(5)
--re.OnClientEvent:Connect(function(reaction)
	ReactionTime.Text = 100
	warn("Fired wingui")
	frame:TweenPosition(UDim2.new(-0.1,-0.15))
	frame.AnchorPoint = Vector2.new(0.1,0.15)
	wait(2.5)
	frame:TweenPosition(UDim2.new(-0.35,-0.5))
	wait(1)
	frame.AnchorPoint = Vector2.new(0.35,0.5)
--end)

And the PlayerGui
image

1 Like

Okay never mind I forgot that you have to add 0’s to UDim2, making it UDim2.new(-0.1,0,-0.15,0)

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.