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
 

Button click activates script

Previous Thread :: Next Thread 
patrick18251 is not online. patrick18251
Joined: 14 Jul 2009
Total Posts: 1328
21 Aug 2017 11:45 AM
How exactly do I make this?

I'm REALLY new to scripting and i'm just trying to make a really basic script but I can't seem to figure this out
Report Abuse
iiMashronXXI is not online. iiMashronXXI
Joined: 04 Oct 2012
Total Posts: 5
21 Aug 2017 11:48 AM
Try script.Parent.Parent.Target.ClickMousePlayer
Report Abuse
viperx777waw is not online. viperx777waw
Joined: 31 Mar 2016
Total Posts: 368
21 Aug 2017 12:17 PM
hm a button for team change qui?


I Hate Human Verfication
Report Abuse
craftitcool74 is not online. craftitcool74
Joined: 17 Jul 2016
Total Posts: 14
21 Aug 2017 12:35 PM
try:

local plr = game.Players.LocalPlayer

script.Parent.MouseButton1Click:connect(function()
plr.TeamColor = BrickColor.new("Your Team")
plr:LoadCharacter()
end)


SwagMasterSteff
Report Abuse
Vxrtual is not online. Vxrtual
Joined: 18 Apr 2015
Total Posts: 26
21 Aug 2017 01:23 PM
Wait... so you want a button that makes a script enabled? k...

Try this:

(put this script inside the button)

local clickdetector = Instance.new("ClickDetector")

clickdetector.Parent = game.Workspace.(your button name)

function enable()
(location of script ex. game.ServerScriptStorage.Script).Disabled = false
end

clickdetector.MouseClick:connect(enable)

Is this what you meant? Or did u mean when u click your mouse button it activates a script?
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