#tweenpositioning
31 messages · Page 1 of 1 (latest)
but can you send the entire script
with bar defined (and cam preferably)
and an explorer structure of you screengui
the elseif doesnt look necessary
you can just use else
and the code is not ina prettier version yk what i mean?
but that doesnt matter to much
try this:
local debounce = false
button.MouseButton1Click:connect(function()
if debounce == false then
debounce = true
bar:TweenPosition(UDim2.new(0.5, -100, 1, -50), "In", "Linear", 1, true)
pcall(function()
title.Text = game.Players:GetPlayerFromCharacter(cam.CameraSubject.Parent).Name
end)
else
debounce = false
pcall(function()
cam.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
end)
bar:TweenPosition(UDim2.new(0.5, -100, 1, -50), "Out", "Linear", 1, true)
end
end)
yea should be around 0.5 or 1
Sorry, i was just trying to get it into the position on the screen to where i intend for it to be
just imagine it coming from the bottom middle, and rising up a little bit
thats what i was tryna do
read from here please
local debounce = false -- {6.94, -100},{2.34, -50}
button.MouseButton1Click:connect(function()
if debounce == false then debounce = true
bar:TweenPosition(UDim2.new(8.41,-100,3.5,-50),"In","Linear",1,true) -- {8.33, -100},{2.08, -50}
pcall(function()
title.Text = game.Players:GetPlayerFromCharacter(cam.CameraSubject.Parent).Name
end)
elseif debounce == true then debounce = false
pcall(function() cam.CameraSubject = game.Players.LocalPlayer.Character.Humanoid end)
bar:TweenPosition(UDim2.new(8.32,-100,3.4,-50),"Out","Linear",1,true)
end
end)
prev.MouseButton1Click:connect(function()
wait(.1)
local players = game.Players:GetPlayers()
local num = get()
if not pcall(function()
cam.CameraSubject = players[num-1].Character.Humanoid
end) then
cam.CameraSubject = players[#players].Character.Humanoid
end
pcall(function()
title.Text = game.Players:GetPlayerFromCharacter(cam.CameraSubject.Parent).Name
end)
end)
nex.MouseButton1Click:connect(function()
wait(.1)
local players = game.Players:GetPlayers()
local num = get()
if not pcall(function()
cam.CameraSubject = players[num+1].Character.Humanoid
end) then
cam.CameraSubject = players[1].Character.Humanoid
end
pcall(function()
title.Text = game.Players:GetPlayerFromCharacter(cam.CameraSubject.Parent).Name
end)
end)```
.
.
cam = game.Workspace.CurrentCamera
local bar = script.Parent.Bar
** You are now Level 4! **
i'm not necessarily trying to solve the problem cuz it seemed to be worrking, but i just couldnt figure out how to get it in the position i want it to be in
properly*
ohhhh
i see
you can just put the bar on the bottom of the screen, copy the position of the bar
and do the same for the top
wdym by this tho
wyhere do i even put the positions i want it to start adn end in
udim2