OnlineOne
|
  |
| Joined: 14 Jul 2011 |
| Total Posts: 1193 |
|
|
| 11 Nov 2016 05:05 PM |
local parent = script.Parent local dominantPlayer = script
dominantPlayer = game.Players:FindFirstChild(dominantPlayer.Name)
local victimPlayer = parent
victimPlayer = game.Players:FindFirstChild(victimPlayer.Name)
while wait() do--supposed to teleport the victimPlayer to dominantPlayer + (1, 0, 1) position every wait(). local dominantPos = dominantPlayer.Character.Torso local victimPos = victimPlayer.Character.Torso victimPos.CFrame = CFrame.new(dominantPos.CFrame + CFrame.new(1, 0, 1)) end
--Script's name is the name of the 'dominantPlayer'. Please help!
--Online |
|
|
| Report Abuse |
|
|
caca50
|
  |
| Joined: 10 Jul 2011 |
| Total Posts: 2037 |
|
|
| 11 Nov 2016 05:10 PM |
| victimPos.CFrame = CFrame.new(dominantPos.CFrame + Vector3.new(1, 0, 1)) |
|
|
| Report Abuse |
|
|
caca50
|
  |
| Joined: 10 Jul 2011 |
| Total Posts: 2037 |
|
|
| 11 Nov 2016 05:10 PM |
| http://wiki.roblox.com/index.php?title=CFrame#CFrame_.2B_Vector3 |
|
|
| Report Abuse |
|
|
OnlineOne
|
  |
| Joined: 14 Jul 2011 |
| Total Posts: 1193 |
|
|
| 11 Nov 2016 05:17 PM |
Thanks for the help, but it still doesn't work.
--Online |
|
|
| Report Abuse |
|
|
caca50
|
  |
| Joined: 10 Jul 2011 |
| Total Posts: 2037 |
|
|
| 11 Nov 2016 05:18 PM |
Errors? What is it doing?
You need to provide what is actually happening instead of just code |
|
|
| Report Abuse |
|
|
OnlineOne
|
  |
| Joined: 14 Jul 2011 |
| Total Posts: 1193 |
|
|
| 11 Nov 2016 05:20 PM |
No errors. And like I said, it's just doing... nothing.
--Online |
|
|
| Report Abuse |
|
|
caca50
|
  |
| Joined: 10 Jul 2011 |
| Total Posts: 2037 |
|
|
| 11 Nov 2016 05:23 PM |
where is the script located?
Is it's ancestor workspace, or Players? |
|
|
| Report Abuse |
|
|
OnlineOne
|
  |
| Joined: 14 Jul 2011 |
| Total Posts: 1193 |
|
|
| 11 Nov 2016 05:24 PM |
It's located inside the victimPlayer.
--Online |
|
|
| Report Abuse |
|
|
caca50
|
  |
| Joined: 10 Jul 2011 |
| Total Posts: 2037 |
|
|
| 11 Nov 2016 05:25 PM |
| And is that the Player object, that is inside of 'game.Players' or is it the character that is inside of 'game.Workspace'? |
|
|
| Report Abuse |
|
|
|
| 11 Nov 2016 05:26 PM |
| did you look inside of the server window console for errors? I can't imagine there would be none. |
|
|
| Report Abuse |
|
|
caca50
|
  |
| Joined: 10 Jul 2011 |
| Total Posts: 2037 |
|
|
| 11 Nov 2016 05:26 PM |
| scripts do not run inside of game.Players |
|
|
| Report Abuse |
|
|
OnlineOne
|
  |
| Joined: 14 Jul 2011 |
| Total Posts: 1193 |
|
|
| 11 Nov 2016 05:27 PM |
It's the player, not the Character. The Explorer looks like this.
game Players Player1 Script OtherStuff
--Online |
|
|
| Report Abuse |
|
|
caca50
|
  |
| Joined: 10 Jul 2011 |
| Total Posts: 2037 |
|
|
| 11 Nov 2016 05:28 PM |
As I said, it doesn't work inside of players.
A player object is inside of players. |
|
|
| Report Abuse |
|
|
OnlineOne
|
  |
| Joined: 14 Jul 2011 |
| Total Posts: 1193 |
|
|
| 11 Nov 2016 05:29 PM |
Ah, that's the problem then. I'll put it in the PlayerScripts then. Thanks for the help!
--Online |
|
|
| Report Abuse |
|
|