Hey, I’ve been trying to make it so that whenever the player has joined the game, the frame’s position, size and visibility changes. I’ve got this code written, but its not working. It may be an issue with some other part from my script, but id doubt it. This is my script:
local function onPlayerAdded(player)
player.CharacterAdded:Connect(function(character)
-- Get the ItemsFrame
local ItemsFrame = player.PlayerGui:WaitForChild("ScreenGui").ItemsFrame
-- Set the initial position and size
ItemsFrame.Position = UDim2.new(1.1, 0, 0.5, 0)
ItemsFrame.Size = UDim2.new(0.1, 0, 0.1, 0)
ItemsFrame.Visible = false
end)
end
-- Connect the onPlayerAdded function to the PlayerAdded event
game.Players.PlayerAdded:Connect(onPlayerAdded)