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
 

Serious help with Object Values

Previous Thread :: Next Thread 
ConfusedRabbit is not online. ConfusedRabbit
Joined: 06 Jan 2013
Total Posts: 194
24 Mar 2013 08:58 PM
I will make it short as this, as it happens over several scripts

First, it goes

s = game.Lighting.MODELnotPART:Clone()
s.Name = "NEWNAME"
s.Parent = p(Meaning player)


Then new script

l = p:findFirstChild("NEWNAME")
if l ~= nil then
p.OBJECTVALUE.Value = l

Then new script

p.Character:MoveTo(Vector3.new(l.Float.Position))

And it teleports, but to a random spot. I don't even know why, but it is the same spot.

Note: This is not how it actual goes, I took the important parts and simulated it.

Report Abuse
ConfusedRabbit is not online. ConfusedRabbit
Joined: 06 Jan 2013
Total Posts: 194
24 Mar 2013 11:39 PM
help
Report Abuse
ConfusedRabbit is not online. ConfusedRabbit
Joined: 06 Jan 2013
Total Posts: 194
25 Mar 2013 12:15 AM
anyone
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
25 Mar 2013 01:38 AM
p.Character:MoveTo(Vector3.new(l.Float.Position))

If you're using an ObjectValue in this line, (I can't actually tell) you need to do ".Value.Position", since the object is 'stored' within the value of the ObjectValue.

p.Character:MoveTo(Vector3.new(l.Float.Value.Position))
Report Abuse
DoctorEvo is not online. DoctorEvo
Joined: 22 Apr 2008
Total Posts: 199
25 Mar 2013 03:35 AM
Position is a Vector3 already. You don't need to declare a new Vector3 instance.

p.Character:MoveTo(I.Float.Position)
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
26 Mar 2013 01:17 PM
@Doc, Whoops, thank you for pointing that out. I do not know why I even did that, bleh.
Report Abuse
DoctorEvo is not online. DoctorEvo
Joined: 22 Apr 2008
Total Posts: 199
26 Mar 2013 06:35 PM
You did it because ConfusedRabbit did.
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