|
| 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 |
|
|
|
| 05 Feb 2014 08:26 AM |
| Unless you are using a debounce and global variables, it should already do that. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
| |
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 05 Feb 2014 09:22 AM |
don't you know what a conditional statement is?
use it. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 05 Feb 2014 09:29 AM |
| Hmm, for two people with debounce. Not sure if ya can, but maybe coroutines? |
|
|
| Report Abuse |
|
|
|
| 05 Feb 2014 09:29 AM |
| why don't you just clone scripts into the players |
|
|
| Report Abuse |
|
|
|
| 05 Feb 2014 09:32 AM |
| shiny bear nice idea. I will try that. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|