Less than half of DragStopped function gets called, why?
I have a Label that has a function that when it stops being dragged the function runs like so:
01 | script.Parent.DragStopped:connect( function (X, Y) |
02 | print (( "dragging stopped at (%i, %i)" ):format(X, Y), " myPos: " ,script.Parent.Position) |
03 | local entireFrame = game.Players.LocalPlayer.PlayerGui.ScriptPart.entireFrame |
05 | local data = entireFrame.Script.GetPreviousPos:Invoke(script.Parent.Value.Value,script.Parent.Name) |
12 | local partialX = (((entireFrame.AbsoluteSize.X/ 2 )/ 2 )/ 2 )/ 2 |
13 | print ( "frame: " ,entireFrame.AbsoluteSize.X/ 2 / 2 , " math:" ,(entireFrame.AbsoluteSize.X/ 2 / 2 ) + partialX, " less than X: " ,(entireFrame.AbsoluteSize.X/ 2 / 2 ) + partialX > = X, " X: " ,X) |
15 | if ((entireFrame.AbsoluteSize.X/ 2 )/ 2 ) + partialX > = X then |
16 | script.Parent:TweenPosition(UDim 2. new(data [ 1 ] - 1 , 0 ,data [ 2 ] , 0 )) |
17 | elseif ((entireFrame.AbsoluteSize.X/ 2 )/ 2 ) + partialX < = X then |
18 | entireFrame.Script.addToScriptEditor:Invoke(script.Parent.Value.Value,script.Parent.Text) |
19 | script.Parent.Position = UDim 2. new(data [ 1 ] - 1 , 0 ,data [ 2 ] , 0 ) |
21 | print ( "idk what to tell you dude" ) |
it prints "dragging etc..." and "test", i also have more print statements to see if GetPreviousPos gets invoked but it doesn't print either. This all works perfectly fine in Play Mode but not when starting the server in Studio and in online mode. Any suggestions?