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: Question about this script...

Previous Thread :: Next Thread 
riolusniper is not online. riolusniper
Joined: 13 Jul 2009
Total Posts: 1351
15 Aug 2011 04:44 PM
enabled = true
function onHit(hit)
local human = hit.Parent:findFirstChild("Humanoid")

if (human ~= nil) and not enabled then return end
enabled = false
How do I make this script so that, instead of the message just appearing for the one who touches it, it appears for everyone?

local user = game.Players:findFirstChild(hit.Parent.Name)
if user ~= nil then

local message = script.Parent.Message:clone()

message.Text.Text = "Attackers win!"
message.Parent = user.PlayerGui
wait(5)
if message ~= nil then
message:remove()
wait(5)
enabled = true
else
wait(5)
enabled = true
end
end
end

script.Parent.Touched:connect(onHit)
Report Abuse
riolusniper is not online. riolusniper
Joined: 13 Jul 2009
Total Posts: 1351
15 Aug 2011 04:50 PM
bump
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
15 Aug 2011 04:54 PM
"message.Parent = user.PlayerGui"

Just change that to:

message.Parent = workspace
Report Abuse
lupine is not online. lupine
Joined: 24 Jun 2008
Total Posts: 3561
15 Aug 2011 04:55 PM
No, he wants it only to show for that player.

message.Parent = user

Should only display it for that user.
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
15 Aug 2011 04:58 PM
@lupine - One, then NOBODY would be able to see it, and two, he said:

"How do I make this script so that, instead of the message just appearing for the one who touches it, it appears for everyone?"

So, he wants everyone to be able to see it.
Report Abuse
lupine is not online. lupine
Joined: 24 Jun 2008
Total Posts: 3561
15 Aug 2011 05:03 PM
Oh, right.

I only read the replies.

:P My bad.

(If you parent a message to a player, only that player can see it.)
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
15 Aug 2011 05:05 PM
@lupine - That's not true. It used to be, yes, but ROBLOX made an update that makes that not work anymore... Now, local messages go in the PlayerGui.
Report Abuse
lupine is not online. lupine
Joined: 24 Jun 2008
Total Posts: 3561
15 Aug 2011 11:50 PM
D'aw.

I'm old.

xD
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
15 Aug 2011 11:52 PM
@lupine - This isn't my first account, you know. My first was from 2008. :P
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