Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

GUI slightly moving in corner of screen?

i am trying to make a GUI that is always slightly bobbing in the corner of the screen, but my script is not working

here is the script (i had a feeling it wouldn't work since i haven't played with tweening much)

GUI = script.Parent

while wait() do
	GUI:TweenPosition(UDim2.new(0.009, 0, 0.978, 0))
	GUI:TweenPosition(UDim2.new(0.009, 0, 0.013, 0))
end

3 comments

0

post the code in a code block....the link is not working for me

0

my only question is how?

0

done there you go

1 answer

✓ Accepted answer

The script isn't working because of a multitude of reasons. First, you have not fulfilled all the specified parameters for TweenPosition. You can find them here: https://developer.roblox.com/en-us/api-reference/function/GuiObject/TweenPosition You forgot to have:

  • easingDirection
  • easingStyle
  • time

Also, you shouldn't put a tween position in a loop that consistently repeats itself with almost no delay. You should add a small wait so players can actually see the movement like so:

GUI = script.Parent

while wait() do
    GUI:TweenPosition(UDim2.new(0.009, 0, 0.978, 0))
	wait(2) -- adding a wait will allow players to see the movement of the gui. 
    GUI:TweenPosition(UDim2.new(0.009, 0, 0.013, 0)) 
end

2 comments

0

thx

0

tho its not endlessly looping

This discussion is preserved as it was. New answers, comments, and votes are closed.