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
 

I need help on something that needs to be local

Previous Thread :: Next Thread 
DragonOfWar900 is not online. DragonOfWar900
Joined: 11 May 2011
Total Posts: 1508
07 Mar 2014 08:20 PM
So, theres a button on my game that, when you click, the brick changes color. This needs to be local, that means, only the person that clicked the button, should see the brick change color. But, i made that and, on another account i had, i tested my game and it didnt did what i want, in account 1 i clicked the button and the brick changed, and on account 2, i saw the brick change, and i dont want that, i want that the account 1 clicked the button and only he can see the brick change, while account 2, still didnt clicked the button, didnt see the brick change. What should i do?
Script:
local CD = script.Parent
local function onMouseClick(Player)
Light = script.Parent.Parent.Parent.Light
Light.BrickColor = BrickColor.new("Lime green")
script.Parent.Parent.Sound:Play()
wait(1)
Player.PlayerGui.ScreenGui.MTSBDZ.Value = true
Player.PlayerGui.ScreenGui.LeftButton.Visible = false
Player.PlayerGui.ScreenGui.RightButton.Visible = false
end
CD.MouseClick:connect(onMouseClick)

Notes: The script is a normal script, thats inside a click detector
Report Abuse
DragonOfWar900 is not online. DragonOfWar900
Joined: 11 May 2011
Total Posts: 1508
07 Mar 2014 08:26 PM
pls help
Report Abuse
DragonOfWar900 is not online. DragonOfWar900
Joined: 11 May 2011
Total Posts: 1508
07 Mar 2014 08:31 PM
bump
Report Abuse
ayub32 is not online. ayub32
Joined: 27 Dec 2009
Total Posts: 485
07 Mar 2014 08:32 PM
Put the brick in the camera so the player can see it and not other players
Report Abuse
DragonOfWar900 is not online. DragonOfWar900
Joined: 11 May 2011
Total Posts: 1508
07 Mar 2014 08:51 PM
@ayub Thank you for trying to help, but when i putted in camera, the brick just disapears
Report Abuse
KiwiTronik is not online. KiwiTronik
Joined: 18 Feb 2010
Total Posts: 3221
07 Mar 2014 08:52 PM
Workspace.CurrentCamera

Then the part will only be visible to the local player.
Report Abuse
DragonOfWar900 is not online. DragonOfWar900
Joined: 11 May 2011
Total Posts: 1508
07 Mar 2014 08:54 PM
@above so how do i manage to put those bricks inside the currentcamera
Report Abuse
DragonOfWar900 is not online. DragonOfWar900
Joined: 11 May 2011
Total Posts: 1508
07 Mar 2014 09:01 PM
oh wait i saw in the wiki
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