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 » Scripters
Home Search
 

Re: Global Gui Help

Previous Thread :: Next Thread 
PraetorianTheGod is not online. PraetorianTheGod
Joined: 02 May 2014
Total Posts: 814
11 Nov 2015 05:49 AM
I have a code:
local background = script.Parent.BG
local text = background.Text

game.Lighting.Fire.OnServerEvent:connect(function(player, message, over)
if over == false then
text:TweenPosition(UDim2.new(0, 0,0.5, -50))
text.Text = message
end
if over == true then
text:TweenPosition(UDim2.new(0, 0,-0.5,0))
text.Text = ""
end
end)

I need help, this is in a regular script in a gui, which everyone gets and I want it so I can simply put game.Lighting.Fire:FireAllClients("MSG", true/false) and it'll show up on everyones screens, any reason it is not working? I've tinkered so many different settings with it. The error I get with this version is nothing. Nothing appears in the output at all. Please help!
Report Abuse
PraetorianTheGod is not online. PraetorianTheGod
Joined: 02 May 2014
Total Posts: 814
11 Nov 2015 06:22 AM
BUMP#1 UPDATE

So, I've changed the script a little, it is a local script now. Still in the gui! The remote event it calls is in the lighting. Once again this is a local script inside of the player's GUI:
local background = script.Parent.BG
local text = background.Text

game.Lighting.Fire.OnClientEvent:connect(function(message, over)
if over == false then
text:TweenPosition(UDim2.new(0, 0,0.5, -50))
text.Text = message
end
if over == true then
text:TweenPosition(UDim2.new(0, 0,-0.5,0))
text.Text = ""
end
end)


This is how I fire the RemoteEvent from a normal script in the workspace:
game.Lighting.Fire:FireAllClients("This game requires 2 players to play, sorry!", false)


It works in solo networking but in the real client the game runs like the messages are popping up, but they are not. Errors I get:
Report Abuse
MoonTerminator is not online. MoonTerminator
Joined: 23 Nov 2014
Total Posts: 174
11 Nov 2015 07:37 AM
"It works in solo networking but in the real client the game runs like the messages are popping up" - when are you showing the message, if it's as soon as someone connects then it's likely it'll be missed by the real client. You could try adding a wait in your script just as a test.


Report Abuse
Ben1925 is not online. Ben1925
Joined: 07 Apr 2011
Total Posts: 741
11 Nov 2015 08:02 AM
I remember doing something like this (And it did work)

I did something like this:

Remote Event is @ game.Workspace.RemoteEvents.notifyClient -- Does exactly what you think it does

-- Server Script (Script inside Workspace)

local event = workspace.RemoteEvents.notifyClient
event:FireAllClients("Hello hello message here", 4) -- 4 is for the timeout.




-- Client Script (LocalScript in a TextButton inside the StarterGui)

local event = workspace.RemoteEvents.notifyClient

event.OnClientEvent:connect(function(notif, timeout)
script.Parent.Text = notif
wait(1)
script.Parent:TweenPosition(UDim2.new(0.03,0,0.8,0)) -- Moves to visible area
wait(timeout)
script.Parent:TweenPosition(UDim2.new(0.03,0,1,0)) -- Moves to edge (So it can't be seen)
end)

Report Abuse
Dogejia is not online. Dogejia
Joined: 08 Feb 2012
Total Posts: 1873
11 Nov 2015 09:09 AM
Try moving the remoteevent to the replicatedstorage


Dogemon, gotta pet them all!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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