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: CFrame and MoveTo bug will pay if you help me

Previous Thread :: Next Thread 
willz217 is not online. willz217
Joined: 09 Dec 2008
Total Posts: 1396
08 Apr 2013 07:55 PM
I tried to make the player teleport to this area using CFrame/MoveTo but still, it doesn't work. It works perfectly when the player is not moving while jumping. But when he does, he doesn't get teleported. I kept on looking at the script but still, no success.
Here's my script. P.S. Don't worry about the end's. They're fine. I didn't add them.

CODE:
if script.Parent.Waiting.Value >= 1 then
game.Lighting.Easy.Main:Clone().Parent = script.Parent
for i,k in pairs(game.Players:GetPlayers()) do
if k.Waiting.Value == 1 then
k.PlayerGui.ScreenGui.Main.Exit.Visible = false
if k.PlayerGui.ScreenGui.Main:findFirstChild("ExitSpectate") then
k.PlayerGui.ScreenGui.Main.ExitSpectate.Visible = false
end
wait()
k.Waiting.Value = 0
if k.Character.Humanoid.Health ~= 0 then
k.Character:MoveTo(Vector3.new(math.random(-16,16),69,math.random(-18,14)))
k.Ingame.Value = 1
Report Abuse
Soapy29 is not online. Soapy29
Joined: 20 Aug 2009
Total Posts: 653
08 Apr 2013 07:56 PM
Try it with out the Vector3.new().
Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
08 Apr 2013 07:57 PM
wait(.01)
game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(Vector3.new(133, 11, 43))
Report Abuse
willz217 is not online. willz217
Joined: 09 Dec 2008
Total Posts: 1396
08 Apr 2013 09:09 PM
@FoggedOut, this is the output. 10:08:11.431 - LocalPlayer is not a valid member of Player
10:08:11.432 - Script "Workspace.Easy.GameScript", Line 30
10:08:11.432 - stack end

@Soapy29, It already has Vector3?
Report Abuse
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
08 Apr 2013 09:10 PM
Willz, we don't need pay.
We help willingly.
Report Abuse
willz217 is not online. willz217
Joined: 09 Dec 2008
Total Posts: 1396
08 Apr 2013 09:16 PM
Thanks, dog456pop248! :)
I badly need help with this, I've spent like the whole night from 12am to 10am trying to figure out the problem. Seriously.
Report Abuse
willz217 is not online. willz217
Joined: 09 Dec 2008
Total Posts: 1396
08 Apr 2013 09:20 PM
I tried with / w/o Vector3.new
I tried MoveTo
I tried CFrame

They still don't teleport when I'm moving while jumping. :(
Report Abuse
Levidoo6 is not online. Levidoo6
Joined: 22 Aug 2009
Total Posts: 1526
08 Apr 2013 09:20 PM
You did math.random wrong and everything else! Why are you making it long for no reason?
Report Abuse
willz217 is not online. willz217
Joined: 09 Dec 2008
Total Posts: 1396
08 Apr 2013 09:25 PM
Really, that's the only thing I can think of right now... What's your fix?
Report Abuse
willz217 is not online. willz217
Joined: 09 Dec 2008
Total Posts: 1396
08 Apr 2013 09:34 PM
Thank you for finding the errors by the way, hope you can help me with this.
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
08 Apr 2013 10:04 PM
try this
replace lol's with your desired numbers. no need for m.r


if script.Parent.Waiting.Value >= 1 then
game.Lighting.Easy.Main:Clone().Parent = script.Parent
for i,k in pairs(game.Players:GetPlayers()) do
if k.Waiting.Value == 1 then
k.PlayerGui.ScreenGui.Main.Exit.Visible = false
if k.PlayerGui.ScreenGui.Main:findFirstChild("ExitSpectate") then
k.PlayerGui.ScreenGui.Main.ExitSpectate.Visible = false
end
wait()
k.Waiting.Value = 0
if k.Character.Humanoid.Health ~= 0 then
k.Character:MoveTo(Vector3.new(lol, lol, lol))
k.Ingame.Value = 1
end
end
end
end
Report Abuse
willz217 is not online. willz217
Joined: 09 Dec 2008
Total Posts: 1396
09 Apr 2013 03:09 AM
What if there are like 10 people inside the lift. They will all get teleported to the game area and they will be bugged. Any idea to load math random before it does it? So it'll generate the numbers before the players get spawned instead of rand. numbers on the spot?
Report Abuse
willz217 is not online. willz217
Joined: 09 Dec 2008
Total Posts: 1396
09 Apr 2013 03:10 AM
Or if I am wrong, is there an alternate way to it?
Report Abuse
getkoed2 is not online. getkoed2
Joined: 11 Apr 2010
Total Posts: 1144
09 Apr 2013 04:02 AM
Remember it should be in a LocalScript if you use LocalPlayer.
Report Abuse
getkoed2 is not online. getkoed2
Joined: 11 Apr 2010
Total Posts: 1144
09 Apr 2013 04:07 AM
You could also try putting

repeat wait() until k.Character.Humanoid.Jump == true

before using MoveTo.

Or just make them jump if it only works then. :c
Report Abuse
willz217 is not online. willz217
Joined: 09 Dec 2008
Total Posts: 1396
09 Apr 2013 04:42 AM
From my post, I said that it sometimes bug when they keep on jumping and moving xc
This is so hard. D:
Hope experts help meh.
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
09 Apr 2013 05:36 AM
Sorry to post this but,

OP, why are you in an ad?
Report Abuse
willz217 is not online. willz217
Joined: 09 Dec 2008
Total Posts: 1396
09 Apr 2013 05:49 AM
LOL! Why?

Btw, still looking for help.
Report Abuse
willz217 is not online. willz217
Joined: 09 Dec 2008
Total Posts: 1396
09 Apr 2013 07:58 AM
BUMP
Report Abuse
getkoed2 is not online. getkoed2
Joined: 11 Apr 2010
Total Posts: 1144
09 Apr 2013 09:36 AM
Oh, sorry.

Then I guess you should first make them stop moving and anchore their torsos, then move them and then unanchore them and give them their walkspeeds back.
Report Abuse
willz217 is not online. willz217
Joined: 09 Dec 2008
Total Posts: 1396
09 Apr 2013 11:13 AM
Thanks, I did this. Thank you. :)
Report Abuse
getkoed2 is not online. getkoed2
Joined: 11 Apr 2010
Total Posts: 1144
09 Apr 2013 01:01 PM
No problem, and good luck
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