-
What do you want to achieve?
A menu where you can play or select a team. -
What is the issue?
I get this error in the output:
“Players.airsoft561.PlayerGui.ScreenGui.function:34: attempt to call a table value” -
What solutions have you tried so far?
Tried to use udim, failed, miserably.
Code:
-- [ MAIN VARIABLES ] --
local playb = script.Parent.MainFrame.playbutto
local teamb = script.Parent.MainFrame.teambutton
local mainframe = script.Parent.MainFrame
local teamframe = script.Parent.TeamFrame
local diahb = teamframe.diahheria
local poopb = teamframe.poop
local smallpb = teamframe.smallp
local backb = teamframe.back
local tweenService = game:GetService("TweenService")
-- [ MAIN CODE ] --
playb.MouseButton1Click:Connect(function()
mainframe:TweenPosition(UDim2.new(1, 1, 0))
end)
teamb.MouseButton1Click:Connect(function()
mainframe:TweenPosition(UDim2.new(0, 1, 1))
wait(0.5)
mainframe.Visible = false
wait(0.1)
teamframe:TweenPosition(UDim2.new(0, 0, 0))
teamframe.Visible = true
wait(0.4)
end)
teamframe.back.MouseButton1Click:Connect(function()
teamframe:TweenPosition(UDim2(0, 1, 1))
wait(0.5)
teamframe.Visible = false
wait(0.1)
mainframe:TweenPosition(UDim2.new(0, 0, 0))
teamframe.Visible = true
print("clicked")
end)
(dont question the variable names, im making a poop game)