For some reason, I loaded in today and I was going crazy because my script won’t function right. I was trying to make a main menu and there was a problem with the script I checked back multiple times and the output said nothing. There should not be anything wrong, The script is basically just opening a frame with Tweenservice by clicking a Textbutton and printing some stuff. Also there was just a line or two of code that made the previous frames visible / invisible.
script
local button = script.Parent
local newframe = script.Parent.Parent.Parent.newframe1
function changeframe()
newframe.Visible = true
if newframe.Visible == true then
print("Button Clicked, Recieving TweenService")
wait(0.8)
print("Successfully Recieved TweenService, Tweenscript1")
end
local tweenService = game:GetService("TweenService")
local info = TweenInfo.new(
0.8,-- duration
Enum.EasingStyle.Quad, -- easing style
Enum.EasingDirection.Out, -- easing direction
0, -- number of times to repeat (0 means no loop)
false, -- reverses the animation if true
0.0) -- delay before starting
local goal = {
Size = UDim2.new(1.5, 0 , 1.5 , 0),
}
local tween = tweenService:Create(newframe, info , goal)
tween:Play()
button.Visible = false
end
button.MouseButton1Click:Connect(changeframe) -- when the button is clicked, run the function newgui
someone pls help
[quote=“meow, post:1, topic:2506976, full:true, username:drxvned”]
For some reason, I loaded in today and I was going crazy because my script won’t function right. I was trying to make a main menu and there was a problem with the script I checked back multiple times and the output said nothing. There should not be anything wrong, The script is basically just opening a frame with Tweenservice by clicking a Textbutton and printing some stuff. Also there was just a line or two of code that made the previous frames visible / invisible.
script
local button = script.Parent
local newframe = script.Parent.Parent.Parent.newframe1
function changeframe()
newframe.Visible = true
if newframe.Visible == true then
print("Button Clicked, Recieving TweenService")
wait(0.8)
print("Successfully Recieved TweenService, Tweenscript1")
end
local tweenService = game:GetService("TweenService")
local info = TweenInfo.new(
0.8,-- duration
Enum.EasingStyle.Quad, -- easing style
Enum.EasingDirection.Out, -- easing direction
0, -- number of times to repeat (0 means no loop)
false, -- reverses the animation if true
0.0) -- delay before starting
local goal = {
Size = UDim2.new(1.5, 0 , 1.5 , 0),
}
local tween = tweenService:Create(newframe, info , goal)
tween:Play()
button.Visible = false
end
button.MouseButton1Click:Connect(changeframe) -- when the button is clicked, run the function newgui
someone pls help
EDIT: The issue was that I had an invalid variable. I had an image background for my menu but I was having issues so I deleted it and I had it as a variable. Because there was this error, the script did not run and for some reason there was no red marks in the script or in the output