#i need help fixing this code

24 messages · Page 1 of 1 (latest)

pine island
#

You need to call the function like this:

animate({0.007, 0, 0, 0})

torn lily
#

Is that the only issue?

#

Or just the one u found

pine island
#

I found only that issue

tiny thicketBOT
#

studio** You are now Level 1! **studio

pine island
#

Are you still having some troubles?

torn lily
#

Nope

tiny thicketBOT
#

studio** You are now Level 3! **studio

torn lily
#

Ima try it now

#

Didn’t work 😦

torn lily
#

Here’s the page if it makes it easier

#

the local script is in menu

pine island
#

Hm.. try to use :WaitForChild instead of :FindFirstChildOfClass

torn lily
#

doesnt work

pine island
#

Oh well, I recommend you to use script.Parent.Position or code in server script

torn lily
#

yo

#

i did it

#

but better

#

local TweenService = game:GetService("TweenService")

local gui = script.Parent

local startPos = gui.Position

local endPos = UDim2.new(0.007, 0,0.866, 0) -- replace these values with your desired end positions

local tweenInfo = TweenInfo.new(0.5) -- replace 0.5 with your desired duration

local function slideToPosition(position)
local tween = TweenService:Create(gui, tweenInfo, {Position = position})
tween:Play()
end

gui.MouseButton1Down:Connect(function()
slideToPosition(UDim2.new(0.007, 0, 0.886, 0)) -- replace these values with your desired positions
end)

gui.MouseButton1Up:Connect(function()
slideToPosition(endPos)
end)

gui.MouseEnter:Connect(function()
slideToPosition(UDim2.new(0.007, 0,0.875, 0)) -- replace these values with your desired positions
end)

gui.MouseLeave:Connect(function()
slideToPosition(endPos)
end)

#

its tween now

#

i love ai helpers

#

they goated