ns001111
|
  |
| Joined: 15 Jan 2011 |
| Total Posts: 2849 |
|
|
| 14 Sep 2011 04:20 PM |
First of all, heres my first question.
Whats wrong with this?
Code: game.Workspace.Map.Door.CFrame = game.Workspace.Map.Door.CFrame + CFrame.new(0.5, 0, 0)
Output: Workspace.Main:61: bad argument #2 to '?' (Vector3 expected, got userdata)
My second question, why didn't this work?
Code:
for i = 1, #p do p[i].Character:MoveTo(game.Workspace.Map.Spawns:FindFirstChild(i).Position) p[i].Character.Humanoid.WalkSpeed = 0 end
Output: None.
It doesn't stop or break, it simply skips it.
~ ns |
|
|
| Report Abuse |
|
|
|
| 14 Sep 2011 04:22 PM |
You cannot add a CFrame value.
+ Vector3.new(0.5,0,0)
Doesn't matter if the first value is CFrame or Vector3. |
|
|
| Report Abuse |
|
|
ns001111
|
  |
| Joined: 15 Jan 2011 |
| Total Posts: 2849 |
|
|
| 14 Sep 2011 04:23 PM |
Okay. Thanks
And the second question? :3
~ ns |
|
|
| Report Abuse |
|
|
|
| 14 Sep 2011 04:24 PM |
What is p?
~If a = b and b = c and c = d and d = e, what does a + b + c + d + e equal to? |
|
|
| Report Abuse |
|
|
ns001111
|
  |
| Joined: 15 Jan 2011 |
| Total Posts: 2849 |
|
|
| 14 Sep 2011 04:26 PM |
I defined it at the beginning.
p = game.Players:GetChildren()
~ ns |
|
|
| Report Abuse |
|
|
|
| 14 Sep 2011 04:27 PM |
| weird. Give me like 3-4 lines above it and 3-4 lines beneat it. |
|
|
| Report Abuse |
|
|
|
| 14 Sep 2011 04:28 PM |
beneath* Wrong button, I meant to press preview.
~If a = b and b = c and c = d and d = e, what does a + b + c + d + e equal to? ~-The genius lies within you. It's not god's fault that you're not smart enough to awaken it. |
|
|
| Report Abuse |
|
|
ns001111
|
  |
| Joined: 15 Jan 2011 |
| Total Posts: 2849 |
|
|
| 14 Sep 2011 04:28 PM |
wait(2) thread = coroutine.create(GUI) coroutine.resume(thread, "Teleporting Players to the Map!", 5) for i = 1, #p do p[i].Character:MoveTo(game.Workspace.Map.Spawns:FindFirstChild(i).Position) p[i].Character.Humanoid.WalkSpeed = 0 end wait(5) for i = 5, 1, -1 do Message("The game will start in..."..i, 1) end
And Message() is a function.
~ ns |
|
|
| Report Abuse |
|
|
|
| 14 Sep 2011 04:30 PM |
It creates the message? I'm sorry, but I don't do coroutines.
~If a = b and b = c and c = d and d = e, what does a + b + c + d + e equal to? ~-The genius lies within you. It's not god's fault that you're not smart enough to awaken it. |
|
|
| Report Abuse |
|
|
ns001111
|
  |
| Joined: 15 Jan 2011 |
| Total Posts: 2849 |
|
|
| 14 Sep 2011 04:31 PM |
Ok. And yeah, the message function:
function Message(text, time) m = Instance.new("Message", game.Workspace) m.Text = text wait(time) m:Remove() end
~ ns |
|
|
| Report Abuse |
|
|
|
| 14 Sep 2011 04:34 PM |
So the message is created?
~If a = b and b = c and c = d and d = e, what does a + b + c + d + e equal to? ~-The genius lies within you. It's not god's fault that you're not smart enough to awaken it. ~-Floodcheck is a stalker. Once you see it, it keeps coming back. |
|
|
| Report Abuse |
|
|
ns001111
|
  |
| Joined: 15 Jan 2011 |
| Total Posts: 2849 |
|
|
| 14 Sep 2011 04:34 PM |
Okay. So the actual coroutine function called GUI is here:
function GUI(text, time) local p = game.Players:GetChildren() gui = script.Message:Clone() gui.Frame.Text.Text = text for i = 1, #p do gui.Parent = p[i].PlayerGui end wait(time) for i = 1, #p do p[i].PlayerGui.Message:Remove() end end
~ ns |
|
|
| Report Abuse |
|
|
ns001111
|
  |
| Joined: 15 Jan 2011 |
| Total Posts: 2849 |
|
|
| 14 Sep 2011 04:36 PM |
Oops.. Didn't mean to hit Post. Anyway, that makes a GUI show up with text. But then its supposed to teleport the players while the GUI is up, so thats why I used a coroutine. But it now skips over that part.
~ ns |
|
|
| Report Abuse |
|
|
ns001111
|
  |
| Joined: 15 Jan 2011 |
| Total Posts: 2849 |
|
| |
|