Idk what’s up but my script is not working. Its just a basic TweenService script that gets triggered by a text button (button.MouseButton1Click:Connect(newgui))
script
local button = script.Parent
local screen2 = script.Parent.Parent.Screen2
local screenframe = script.Parent.Parent.Parent.ScreenGui2.Frame
function newgui()
screenframe.Visible = true
local tweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(
1, -- length of tween
Enum.EasingStyle.Quint, -- easing style of tween
Enum.EasingDirection.Out, -- direction of easing
0, -- number of times to repeat (leave at 0 for infinite)
false, -- reverses the tween if true
0.0) -- delay before starting the tween
end
video
Reply if u can help. Specifically the “Begin Button,” triggers the Tween. The Begin should open a new Gui which contains a frame, and fades in.
There doesn’t appear to be any part in the script which actually plays a tween.
local button = script.Parent
local screen2 = script.Parent.Parent.Screen2
local screenframe = script.Parent.Parent.Parent.ScreenGui2.Frame
function newgui()
screenframe.Visible = true
local tweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(
1, -- length of tween
Enum.EasingStyle.Quint, -- easing style of tween
Enum.EasingDirection.Out, -- direction of easing
0, -- number of times to repeat (leave at 0 for infinite)
false, -- reverses the tween if true
0.0) -- delay before starting the tween
local newTween = tweenService:Create(screenframe, tweenInfo, {Position = UDim2.new(0.5, 0, 0.5, 0)})
-- i don't know how exactly you want the tween to work, you have to fill in your own info
newTween:Play()
end
I would also suggest using button.Activated:Connect(newgui) instead of MouseButton1Click, to support devices which don’t have a mouse.
local tweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(
1, -- length of tween
Enum.EasingStyle.Quint, -- easing style of tween
Enum.EasingDirection.Out, -- direction of easing
0, -- number of times to repeat (leave at 0 for infinite)
false, -- reverses the tween if true
0.0) -- delay before starting the tween
A server script? That’s an interesting choice for UI.
Can we see your full code?
Also, your script is in workspace. I do not recommend placing scripts in workspace for security reasons.
What you should do instead is have a LocalScript instead underneath your GUI. This way, you can easily reference everything.
Here is the script for the Button
(Which is supposed to cause a frame to fade in from a new Gui)
local button = script.Parent
local screen2 = script.Parent.Parent.Screen2
local screenframe = script.Parent.Parent.Parent.ScreenGui2.Frame
function newgui()
screenframe.Visible = true
local tweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(
1, -- length of tween
Enum.EasingStyle.Quint, -- easing style of tween
Enum.EasingDirection.Out, -- direction of easing
0, -- number of times to repeat (leave at 0 for infinite)
false, -- reverses the tween if true
0.0) -- delay before starting the tween
local newTween = tweenService:Create(screenframe, tweenInfo, {Position = UDim2.new(0.5, 0, 0.5, 0)})
newTween:Play()
end
Here is code for the tweeting the Textlabel, Button, and the “Whats new” Gui’s
local text1 = script.Parent
local screengui = script.Parent.Parent
local new = script.Parent.Parent.WN
screengui.IgnoreGuiInset = true
function tween1()
print("function tween1 running...")
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(
0.8, -- duration
Enum.EasingStyle.Cubic, -- easing style
Enum.EasingDirection.Out, -- easing direction
0, -- repeat count (use -1 for infinite)
false, -- reverses the tween if true
0.5) -- delay in seconds before starting the tween
local goal = {}
goal.Position = UDim2.new(0.5,0,0.5,0)
local tween = TweenService:Create(text1,tweenInfo,goal)
tween:Play()
end
wait(2)
tween1()
local startbutton = script.Parent.Parent.Begin
function tween2()
--make tween service and make it allign next to the center of text1
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(
0.8, -- duration
Enum.EasingStyle.Elastic, -- easing style
Enum.EasingDirection.Out, -- easing direction
0, -- repeat count (use -1 for infinite)
false, -- reverses the tween if true
0.5) -- delay in seconds before starting the tween
local goal = {}
--make the finish position in the exact center of the screen
goal.Position = UDim2.new(0.2,0,0.6,0)
local tween = TweenService:Create(startbutton,tweenInfo,goal)
tween:Play()
end
wait(1.55)
tween2()
wait(2.2)
new.TextTransparency = 0
new.TextStrokeTransparency = 0
Your code’s a little messy, but I can immediately spot one thing: you never call the newgui function in the first script.
Also, where is newframe1? None of your scripts reference it but you’re getting an error for it.
Im workin on it, Its my 4th day scripting ever… but I feel like im staring to get some of it
I used button.MouseButton1Click:Connect(newgui) to run the function. However, nothing appears to happen. Im confused with “Newframe1” as well. but ill try to find the problem.