Hello there,
So basically, I’m trying to work on a script which when a player pressed “F” or Left on the DPAD it opens a gui. Here’s my script, nothing is being printed and the frame isn’t tweeting as well as there are no errors.
wait(3)
local Players = game:GetService("Players")
local playerUI = Players.LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("UI")
local userInputService = game:GetService("UserInputService")
local buildOpen = false
userInputService.InputBegan:connect(function(inputObject, gameprocess)
if not gameprocess and inputObject == Enum.KeyCode.F or inputObject == Enum.KeyCode.DPadLeft then
print("opening")
playerUI:FindFirstChild("buildFrame"):TweenPosition(UDim2.new(0.5, 0, 0.5, 0),"In", "Bounce", 1)
end
end)
Thank you for your help if you are able to help me in any way! If not, have a great rest of your day.