|
| 22 Jun 2016 08:48 PM |
It's one line, but one line that doesn't work or error. object.Torso.CFrame = CFrame.new(v.Base.Position + Vector3.new(0, 100, 0)) Given my low knowledge, this should work. Yes, object is the players character.
i like toast |
|
|
| Report Abuse |
|
|
jtefurd
|
  |
| Joined: 01 May 2010 |
| Total Posts: 952 |
|
|
| 22 Jun 2016 08:52 PM |
| I think that kills the character. Use the HumanoidRootPart. |
|
|
| Report Abuse |
|
|
|
| 22 Jun 2016 08:56 PM |
That didn't do anything either, it shouldn't kill the player. Everything else in my script works just fine, it's just not moving the player..
i like toast |
|
|
| Report Abuse |
|
|
brack4712
|
  |
| Joined: 07 Mar 2009 |
| Total Posts: 243 |
|
|
| 22 Jun 2016 09:12 PM |
| You need to use MoveTo: http://wiki.roblox.com/index.php?title=API:Class/Model/MoveTo |
|
|
| Report Abuse |
|
|
|
| 23 Jun 2016 07:24 AM |
Why cant I just use CFrame? It's worked for me in the past... that's what I'm wondering...
i like toast |
|
|
| Report Abuse |
|
|
|
| 23 Jun 2016 07:31 AM |
| u can ur object probably is nil try using waitforchild |
|
|
| Report Abuse |
|
|
|
| 23 Jun 2016 07:44 AM |
It's not nil, and that did nothing either... I'll just post the 5 lines of code to make it easier for people,
function teleportPlayer(plr, part, yoffset) --plr is the character model. part is the model that contains a part that the player needs to teleport to. yoffset is 100. local player = game.Workspace:WaitForChild(plr) player.CFrame = part.Base.CFrame + Vector3.new(0, yoffset, 0) print(plr, part, yoffset) end
NO errors. Does nothing as you expect.
i like toast |
|
|
| Report Abuse |
|
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
|
| 23 Jun 2016 07:45 AM |
We'll for one you can't print an object: "print(plr" You should of got an error, and if you didn't that means your code is not even reaching the end which is a problem.
|
|
|
| Report Abuse |
|
|
|
| 23 Jun 2016 07:46 AM |
function teleportPlayer(plr, part, yoffset) --plr is the character model. part is the model that contains a part that the player needs to teleport to. yoffset is 100. local Player = workspace:WaitForChild(plr) local Torso = Player:WaitForChild("Torso") Torso.CFrame = CFrame.new(part.Position + Vector3.new(0, yoffset, 0)) print(plr, part, yoffset) end
teleportPlayer("Player1", workspace.Baseplate, 10) |
|
|
| Report Abuse |
|
|
|
| 23 Jun 2016 07:48 AM |
u can't do CFrame + Vector
instead u can
CFrame.new(Vector + Vector + Vector) or
CFrame * CFrame |
|
|
| Report Abuse |
|
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
|
| 23 Jun 2016 07:48 AM |
Well* and try this:
function teleportPlayer(plr, part, yoffset) print(plr.Name, part.Name, yoffset) --[[ local player = game.Workspace:WaitForChild(plr) This a model, you can't CFrame a model with just .CFrame, and you don't even need to indicate the model (plr is THE MODEL) local Torso = plr:WaitForChild("Torso") --ALL YOU NEED print('Torso found') Torso.CFrame = part.Base.CFrame + Vector3.new(0, yoffset, 0) print('Teleported Torso') end
|
|
|
| Report Abuse |
|
|
|
| 23 Jun 2016 07:49 AM |
nevermind it seems u can
CFrame + Vector sorry.
print(CFrame.new(1, 1 ,1 ) + Vector3.new(1, 1, 1)) |
|
|
| Report Abuse |
|
|
|
| 23 Jun 2016 07:52 AM |
I've had the script the same as that before, and it still didn't work, and it printed just fine. Doesn't seem like CFraming the torso even works..
i like toast |
|
|
| Report Abuse |
|
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
|
| 23 Jun 2016 07:53 AM |
Tell me what it prints... If it prints nothing, then your not even firing the function...
|
|
|
| Report Abuse |
|
|
|
| 23 Jun 2016 07:55 AM |
Player1 Plot 100 Torso found Teleported Torso
i like toast |
|
|
| Report Abuse |
|
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
| |
|
| |
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
|
| 23 Jun 2016 07:59 AM |
Ok 3 things: 1. Is FE on? 2. Where is this script located? 3. Is this a local or server script?
|
|
|
| Report Abuse |
|
|
|
| 23 Jun 2016 08:00 AM |
FE is on, server script in the workspace, the script works just fine, just that one part out of it.
i like toast |
|
|
| Report Abuse |
|
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
|
| 23 Jun 2016 08:02 AM |
Ok, can you tell me whats this suppose to do? And can you tell me how you're getting the arguments for the functions?
Like how are you getting plr and part
|
|
|
| Report Abuse |
|
|
|
| 23 Jun 2016 08:09 AM |
Is auto-assigns a player to a plot and teleports them, when an object is added to the workspace, it checks to see if it is a player and isn't "nil". Then, it calls another function to check if the player has a plot, if not it returns false, if so it returns true. From there, it loops through a model in the workspace with all of the plots, from there if the player does not have one, is assigns them one, teleports them, then ends but if they have one, it just teleports them to it. Everything works but teleporting.
i like toast |
|
|
| Report Abuse |
|
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
|
| 23 Jun 2016 08:12 AM |
Hmm... I have no clue, should work.
Maybe CFrame.new(part.Base.Position) * CFrame.new(0,yoffset,0)?
|
|
|
| Report Abuse |
|
|
|
| 23 Jun 2016 08:16 AM |
That doesn't work, sorry if I'm a bit annoying at this point, I'll just scrap the teleporting for a later date and make them walk.
i like toast |
|
|
| Report Abuse |
|
|