script.Parent.MouseButton1Click:Connect(function()
if script.Parent.Parent.Type.Text == "69372" then ---Tryna make it so if this is entered
script.Parent.Parent.Result.Text = "Task Completed!" --- and it says this then
wait(1)
script.Parent.Parent:TweenPosition(UDim2.new(1,0,0,0)) -- It moves off my screen
game:WaitForChild("StarterGui").TaskBarGui.Enabled = true
wait(2)
script.Parent:TweenSize(UDim2.new(0,351,0,24), "Out", "Linear", 2, true) --- then make these two work so the task bar goes up.
wait(00.1)
script.Parent:TweenSize(UDim2.new(0,395,0,24), "Out", "Linear", 2, true)
else
script.Parent.Parent.Result.Text = "Task Failed!"
wait(1)
script.Parent.Parent:TweenPosition(UDim2.new(1,0,0,0))
end
end)
(There are “----Message” Text that explain stuff.)
but nothing is working
the thing that isnt working is
game:WaitForChild("StarterGui").TaskBarGui.Enabled = true
wait(2)
script.Parent:TweenSize(UDim2.new(0,351,0,24), "Out", "Linear", 2, true) --- then make these two work so the task bar goes up.
wait(00.1)
script.Parent:TweenSize(UDim2.new(0,395,0,24), "Out", "Linear", 2, true)
You will need to wait for the tween to finish before start a new one or set override to false.
script.Parent:TweenSize(
UDim2.new(0,351,0,24),
"Out", -- This should be Enum.EasingDirection.Out
"Linear", -- This should be Enum.EasingStyle.Linear
2, -- This is the time, and you only waited 0.1 seconds, so the tween couldn't run.
true -- If this is set to true it means it will override tweens that are running.
)
script.Parent:TweenSize(UDim2.new(0,351,0,24), "Out", "Linear", 2, true) --- then make these two work so the task bar goes up.
wait(00.1)
script.Parent:TweenSize(UDim2.new(0,395,0,24), "Out", "Linear", 2, true)
He also needs to change game:WaitForChild("StarterGui").TaskBarGui.Enabled = true to PlayerGui that is within the player.
Changing StarterGui will only affect the player when he respawns.
If you want something else to start while it’s tweening you use a coroutine or a new script.
The script would look something like this:
local func = coroutine.create(function(item)
item:TweenSize(UDim2.new(0,351,0,24), Enum.EasingDirection.Out, Enum.EasingStyle.Linear 2, true)
wait(2)
end)
script.Parent.MouseButton1Click:Connect(function()
if script.Parent.Parent.Type.Text == "69372" then ---Tryna make it so if this is entered
script.Parent.Parent.Result.Text = "Task Completed!" --- and it says this then
wait(1)
script.Parent.Parent:TweenPosition(UDim2.new(1,0,0,0)) -- It moves off my screen
wait(1)
game:GetService('Players').LocalPlayer:WaitForChild('PlayerGui').TaskBarGui.Enabled = true
wait(2)
coroutine.resume(func, script.Parent) --- then make these two work so the task bar goes up.
wait(00.1)
script.Parent:TweenSize(UDim2.new(0,395,0,24), Enum.EasingDirection.Out, Enum.EasingStyle.Linear 2, true)
wait(2)
else
script.Parent.Parent.Result.Text = "Task Failed!"
wait(1)
script.Parent.Parent:TweenPosition(UDim2.new(1,0,0,0))
wait(1)
end
end)