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: Multiple Things Running at the Same Time In One Script

Previous Thread :: Next Thread 
BlockBones2 is not online. BlockBones2
Joined: 19 Oct 2008
Total Posts: 404
05 Feb 2014 07:53 AM
When using a local message in a player's Gui (PlayerGui) the message has to be deleted and the script reran before the next player can get the message. How can I make a brick with a touch function run the script at the same time for different players?
Report Abuse
CodeTheorem is not online. CodeTheorem
Joined: 03 Jun 2009
Total Posts: 2771
05 Feb 2014 08:26 AM
Unless you are using a debounce and global variables, it should already do that.
Report Abuse
LilJoker4675 is not online. LilJoker4675
Joined: 31 Oct 2011
Total Posts: 220
05 Feb 2014 08:27 AM
Ummmmmmmmmmmmmmm, I believe this would be it.

function Touched()
game.Players.GetPlayers()
Instance.new("Message",PlayerGui)
local message = game.Players.PlayerGui
script.Parent.Touched:connect()

It would be something like this, I don't know how your workspace, and all looks.
Report Abuse
BlockBones2 is not online. BlockBones2
Joined: 19 Oct 2008
Total Posts: 404
05 Feb 2014 09:00 AM
I am using deBounce
Report Abuse
shinybearhead is not online. shinybearhead
Joined: 24 Jan 2011
Total Posts: 135
05 Feb 2014 09:14 AM
use a for loop and iterate through all players before changing text and stuff

ply = game.Players:GetPlayers()
for i,v in ipairs(ply) do
msg = Instance.new('Message, v.PlayerGui)
end
Report Abuse
BlockBones2 is not online. BlockBones2
Joined: 19 Oct 2008
Total Posts: 404
05 Feb 2014 09:17 AM
I don't want all players see it or I would just insert the message into the Workspace.
Report Abuse
shinybearhead is not online. shinybearhead
Joined: 24 Jan 2011
Total Posts: 135
05 Feb 2014 09:22 AM
don't you know what a conditional statement is?

use it.
Report Abuse
Solsticedev is not online. Solsticedev
Joined: 02 Feb 2014
Total Posts: 343
05 Feb 2014 09:23 AM
Try

script.Parent.Touched:connect(function(hit)
local m = Instance.new("Message",game.Players:GetPlayerFromCharacter(hit.Parent).PlayerGui)
m.Text = "texthere"
end)
Report Abuse
BlockBones2 is not online. BlockBones2
Joined: 19 Oct 2008
Total Posts: 404
05 Feb 2014 09:27 AM
Yes, I have already made the script. It seems you have just given me a script to get the Character's PlayerGui. I already know how. That is not the question that I asked thankyou.
Report Abuse
Solsticedev is not online. Solsticedev
Joined: 02 Feb 2014
Total Posts: 343
05 Feb 2014 09:29 AM
Hmm, for two people with debounce. Not sure if ya can, but maybe coroutines?
Report Abuse
shinybearhead is not online. shinybearhead
Joined: 24 Jan 2011
Total Posts: 135
05 Feb 2014 09:29 AM
why don't you just clone scripts into the players
Report Abuse
BlockBones2 is not online. BlockBones2
Joined: 19 Oct 2008
Total Posts: 404
05 Feb 2014 09:32 AM
shiny bear nice idea. I will try that.
Report Abuse
Solsticedev is not online. Solsticedev
Joined: 02 Feb 2014
Total Posts: 343
05 Feb 2014 09:32 AM
Still won't work with multiple at the same time with debounce... I believe coroutines are needed.
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