Hello guys, I was programming a gui and i ran into some problems.
--variables--
local Player = game:GetService("Players")
local UIS = game:GetService("UserInputService")
local PlayerGui = Player.LocalPlayer.PlayerGui or Player:FindFirstChild("PlayerGui")
local TweenService = game:GetService("TweenService")
local RS = game:GetService("ReplicatedStorage")
local MenuMode = RS.Values:WaitForChild("InGameMenu")
local Gamee = PlayerGui:WaitForChild("Game_SUI")
local Menu = Gamee:FindFirstChild("SUI_GameMenu")
local HUD = Gamee:WaitForChild("SUI_HUD")
local Inventory = HUD:WaitForChild("Inventory")
MenuMode.Value = true
UIS.InputBegan:Connect(function(input, gameProccesedEvent)
if input.KeyCode == Enum.KeyCode.M then
if MenuMode.Value == true then
Inventory.Visible = false
repeat
wait(0.001)
Menu.BackgroundTransparency -= 0.1
until Menu.BackgroundTransparency <= 0.5
if Menu.BackgroundTransparency == 0.5 then
task.wait(0.1)
Menu.Center:TweenPosition(UDim2.new(0.5, 0,1.55, 0),Enum.EasingDirection.In, Enum.EasingStyle.Back, 0.5, true)
end
end
end
end)
The gui that i’m trying to tween doesn’t even move at all and i don’t seem to be getting any errors on the dev console.
Any feedback on how to fix this issue would be really appreciated!