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
|
  |
| Joined: 20 Aug 2009 |
| Total Posts: 653 |
|
|
| 08 Apr 2013 07:56 PM |
| Try it with out the Vector3.new(). |
|
|
| Report Abuse |
|
|
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
|
  |
| 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 |
|
|
|
| 08 Apr 2013 09:10 PM |
Willz, we don't need pay. We help willingly. |
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 09 Dec 2008 |
| Total Posts: 1396 |
|
|
| 09 Apr 2013 05:49 AM |
LOL! Why?
Btw, still looking for help. |
|
|
| Report Abuse |
|
|
willz217
|
  |
| Joined: 09 Dec 2008 |
| Total Posts: 1396 |
|
| |
|
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
|
  |
| Joined: 09 Dec 2008 |
| Total Posts: 1396 |
|
|
| 09 Apr 2013 11:13 AM |
| Thanks, I did this. Thank you. :) |
|
|
| Report Abuse |
|
|
getkoed2
|
  |
| Joined: 11 Apr 2010 |
| Total Posts: 1144 |
|
| |
|