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: Help

Previous Thread :: Next Thread 
ns001111 is not online. 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
citymaster22 is not online. citymaster22
Joined: 10 Jan 2010
Total Posts: 4993
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 is not online. ns001111
Joined: 15 Jan 2011
Total Posts: 2849
14 Sep 2011 04:23 PM
Okay. Thanks

And the second question? :3

~ ns
Report Abuse
citymaster22 is not online. citymaster22
Joined: 10 Jan 2010
Total Posts: 4993
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 is not online. 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
citymaster22 is not online. citymaster22
Joined: 10 Jan 2010
Total Posts: 4993
14 Sep 2011 04:27 PM
weird. Give me like 3-4 lines above it and 3-4 lines beneat it.
Report Abuse
citymaster22 is not online. citymaster22
Joined: 10 Jan 2010
Total Posts: 4993
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 is not online. 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
citymaster22 is not online. citymaster22
Joined: 10 Jan 2010
Total Posts: 4993
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 is not online. 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
citymaster22 is not online. citymaster22
Joined: 10 Jan 2010
Total Posts: 4993
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 is not online. 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 is not online. 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 is not online. ns001111
Joined: 15 Jan 2011
Total Posts: 2849
14 Sep 2011 04:39 PM
Nvm, it worked now.

~ ns
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