local Player = game:GetService('Players').LocalPlayer
Player.CharacterAdded:Wait()
local Tween = game:GetService("TweenService")
local Sidebar = script.Parent:WaitForChild("Sidebar")
local PlayBtn = Sidebar:WaitForChild("Play")
local CreditsBtn = Sidebar:WaitForChild("Credits")
local SettingsBtn = Sidebar:WaitForChild("Settings")
local Title = Sidebar:WaitForChild("Title")
local SlideOutSide = Tween:Create(Sidebar,TweenInfo.new(0.4,Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false, 0),{Position = UDim2.new(0,0,0,0)})
local HoverOverPlayBtn = Tween:Create(PlayBtn, TweenInfo.new(0.3,Enum.EasingStyle.Back,Enum.EasingDirection.Out),{Size = UDim2.new(1,0,0.1,0)})
local HoverOverCreditsBtn = Tween:Create(CreditsBtn, TweenInfo.new(0.3,Enum.EasingStyle.Back,Enum.EasingDirection.Out),{Size = UDim2.new(1,0,0.1,0)})
local HoverOverSettingsBtn = Tween:Create(SettingsBtn, TweenInfo.new(0.3,Enum.EasingStyle.Back,Enum.EasingDirection.Out),{Size = UDim2.new(1,0,0.1,0)})
I see no line where your tweens are supposed to play, you should get the player mouse and make an event for MouseForward and MouseBackward (Mouse scroll)
This only plays the tween once when the script runs.
Instead you should do something like:
local Player = game:GetService('Players').LocalPlayer
local Mouse = Player:GetMouse()
Player.CharacterAdded:Wait()
local Tween = game:GetService("TweenService")
local Sidebar = script.Parent:WaitForChild("Sidebar")
local PlayBtn = Sidebar:WaitForChild("Play")
local CreditsBtn = Sidebar:WaitForChild("Credits")
local SettingsBtn = Sidebar:WaitForChild("Settings")
local Title = Sidebar:WaitForChild("Title")
local SlideOutSide = Tween:Create(Sidebar,TweenInfo.new(0.4,Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false, 0),{Position = UDim2.new(0,0,0,0)})
local HoverOverPlayBtn = Tween:Create(PlayBtn, TweenInfo.new(0.3,Enum.EasingStyle.Back,Enum.EasingDirection.Out),{Size = UDim2.new(1,0,0.1,0)})
local HoverOverCreditsBtn = Tween:Create(CreditsBtn, TweenInfo.new(0.3,Enum.EasingStyle.Back,Enum.EasingDirection.Out),{Size = UDim2.new(1,0,0.1,0)})
local HoverOverSettingsBtn = Tween:Create(SettingsBtn, TweenInfo.new(0.3,Enum.EasingStyle.Back,Enum.EasingDirection.Out),{Size = UDim2.new(1,0,0.1,0)})
Mouse.MouseBackward:Connect(function()
SlideOutSide:Play()
end)
Hello, I read the article, but it does not have the effect that I wanted to achieve. In the video that I mentioned, the sidebar slides (or shows rather than scroll) from one side, and that is what I wanted to achieve, but my code was not working. Any ideas?
Once the character finishes loading. That is why I used Player.CharacterAdded:Wait()
What I wanted to do, is that once the player loads in, the sidebar slides, and the player is able to see it. However, when I used my original script, the tween would not play