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
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