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 » Scripting Helpers
Home Search
 

Re: Relative radar?

Previous Thread :: Next Thread 
ScriptOn is online. ScriptOn
Joined: 22 Aug 2010
Total Posts: 10885
17 May 2013 07:42 PM
I`m trying to get a relative rader GUI, meaning the players move around you.

vv.Position = UDim2.new((v.Character.Torso.Position.X:inverse()*character.Torso.Position.X)/250+0.5,-5,(v.Character.Torso.Position.inverse()*character.Torso.Position.Z)/250+0.5,-5)


v.Character is all the player, and character is you. I can't get this to work.
Report Abuse
ScriptOn is online. ScriptOn
Joined: 22 Aug 2010
Total Posts: 10885
17 May 2013 07:44 PM
bump
Report Abuse
MrChubbs is not online. MrChubbs
Joined: 14 Oct 2010
Total Posts: 4969
17 May 2013 07:44 PM
Too complicated if you ask me, just subtract the position values take the x and y, divide them by the max range and elimate any outside of that range.
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
17 May 2013 07:46 PM
local relative = character.Torso.CFrame:toWorldSpace(v.Character.Torso.CFrame):inverse()

vv.Position = UDim2.new(relative.x/250 + 0.5, -5, relative.z/250+0.5, -5)

Should work.
Report Abuse
ScriptOn is online. ScriptOn
Joined: 22 Aug 2010
Total Posts: 10885
17 May 2013 07:52 PM
:/ its spawning things way far out.
Report Abuse
ScriptOn is online. ScriptOn
Joined: 22 Aug 2010
Total Posts: 10885
17 May 2013 08:02 PM
This worked local relative = character.Torso.CFrame:inverse()*v.Character.Torso.CFrame
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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