|
| 30 Jul 2015 04:07 PM |
while wait() do position, onscreen = game.Workspace.CurrentCamera:WorldToScreenPoint(game.Workspace.Part.Position) print(position.x,position.y,"It is ".. tostring(onscreen) .." that the part is on screen") if onscreen==false then print("t1") if script.Parent.ScreenGui.Frame.Position.X.Offset>=-1 and script.Parent.ScreenGui.Frame.Position.Y.Offset>=-1 then script.Parent.ScreenGui.Frame.Position = UDim2.new(0,position.x,0,position.y) elseif script.Parent.ScreenGui.Frame.Position.X.Offset>=-1 and script.Parent.ScreenGui.Frame.Position.Y.Offset<=-1 then script.Parent.ScreenGui.Frame.Position = UDim2.new(0,0,position.y,0) script.Parent.ScreenGui.Frame.Rotation = 90 elseif script.Parent.ScreenGui.Frame.Position.X.Offset<=-1 and script.Parent.ScreenGui.Frame.Position.Y.Offset>=-1 then script.Parent.ScreenGui.Frame.Position = UDim2.new(position.x,0,0,0) script.Parent.ScreenGui.Frame.Rotation = 0 elseif script.Parent.ScreenGui.Frame.Position.X.Offset<=-1 and script.Parent.ScreenGui.Frame.Position.Y.Offset<=-1 then script.Parent.ScreenGui.Frame.Position = UDim2.new(0,0,0,0) script.Parent.ScreenGui.Frame.Rotation = 45 end elseif onscreen==true then print("t2") end end --[[So basically my problem is that I am trying to make the arrow so that it points to the brick when the brick is not on your screen, so you still know where it is. But when the brick wasnt on screen the arrow wouldn't show up because it would be ON the brick despite the parameters, oddly enough if the brick was like half way on the screen it would almost work, why aren't my parameters working the way I want them to? (By the way my goal was to have the arrows only on the edge of the screen and following the part, like in the video game, Xenoverse]]-- |
|
|
| Report Abuse |
|
| |
| |