generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Gui Parameter/WorldToScreenPoint Trouble

Previous Thread :: Next Thread 
TrainingToTroll is not online. TrainingToTroll
Joined: 27 Oct 2012
Total Posts: 1757
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
TrainingToTroll is not online. TrainingToTroll
Joined: 27 Oct 2012
Total Posts: 1757
30 Jul 2015 10:23 PM
Buhmp
-UMADSTUDIO
Report Abuse
TrainingToTroll is not online. TrainingToTroll
Joined: 27 Oct 2012
Total Posts: 1757
31 Jul 2015 07:00 PM
qq
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image