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: How do I edit a player GUI?

Previous Thread :: Next Thread 
brightScarf is not online. brightScarf
Joined: 02 May 2016
Total Posts: 236
26 Jan 2017 06:09 PM
Hey, so here's my script:

local hold = false
script.Parent.Touched:connect(function(hit)
if not hold then
hold = true
game.Players.LocalPlayer.PlayerGui.ScreenGui.ImageGui.Enabled = true
wait(1)
game.Players.LocalPlayer.PlayerGui.ScreenGui.ImageGui.Enabled = false
hold = false
end
end

This works in Studio, but not online. What should I do to fix this?
Report Abuse
OAuth2 is not online. OAuth2
Joined: 27 Nov 2016
Total Posts: 751
26 Jan 2017 06:11 PM
Jeez.

The reason why it works in studio because play testing basically "plays/converts" the game locally, meaning you can access the local player anywhere.

You need to define the player when you want to access it on a real server.
Report Abuse
brightScarf is not online. brightScarf
Joined: 02 May 2016
Total Posts: 236
26 Jan 2017 06:12 PM
@Auth
Okay, but how would I still get it to affect all players? I don't want to type every single ROBLOX username in, after all.
Report Abuse
OAuth2 is not online. OAuth2
Joined: 27 Nov 2016
Total Posts: 751
26 Jan 2017 06:14 PM
You don't need to.

script.Parent.Touched:connect(function(Hit)
if game.Players:GetPlayerFromCharacter(Hit) then
local Player = game.Players:GetPlayerFromCharacter(Hit)
-- do stuff
end
end)
Report Abuse
brightScarf is not online. brightScarf
Joined: 02 May 2016
Total Posts: 236
26 Jan 2017 06:17 PM
Ah, gotcha. Okay, I'll try that. Thanks.
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