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 you call a function?

Previous Thread :: Next Thread 
DexCubing is not online. DexCubing
Joined: 23 May 2010
Total Posts: 105
30 Aug 2015 10:23 PM
Here is the script.

~~~~~~~~~~~~~~~~~
local player = game.Players.Player
local character = player.Character
local tool = player.Backpack.M4

function equip(tool)
tool.Parent = character
end

SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
~~~~~~~~~~~~~~~~~

Entire Script.

~~~~~~~~~~~~~~~~~
bin = script.Parent
move = script.Parent.Parent.Parent

function Click(Player)
if script.Parent.Parent.Parent.Parent.GunSelector.Value == "M4" then
game.Lighting.M4:Clone().Parent = game.Players.LocalPlayer.Backpack

local player = game.Players.LocalPlayer
local character = player.Character
local tool = player.Backpack.M4

function equip(tool)
tool.Parent = character
end

game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
move:Destroy()
print("Entered")
end

bin.MouseButton1Click:connect(Click)
~~~~~~~~~~~~~~~~~
Report Abuse
xlaser23 is not online. xlaser23
Joined: 10 Dec 2011
Total Posts: 20341
30 Aug 2015 10:27 PM
What da heel is bin



http://www.roblox.com/xla-item?id=290739801http://www.roblox.com/aser-item?id=290739819http://www.roblox.com/23-item?id=290739831 R$86 Tx914
Report Abuse
DexCubing is not online. DexCubing
Joined: 23 May 2010
Total Posts: 105
30 Aug 2015 10:29 PM
bin = script.Parent

....
Report Abuse
xlaser23 is not online. xlaser23
Joined: 10 Dec 2011
Total Posts: 20341
30 Aug 2015 10:30 PM
Is it a Textbuttion?

Part?



http://www.roblox.com/xla-item?id=290739801http://www.roblox.com/aser-item?id=290739819http://www.roblox.com/23-item?id=290739831 R$86 Tx914
Report Abuse
DexCubing is not online. DexCubing
Joined: 23 May 2010
Total Posts: 105
30 Aug 2015 10:32 PM
A variable.
Report Abuse
xlaser23 is not online. xlaser23
Joined: 10 Dec 2011
Total Posts: 20341
30 Aug 2015 10:36 PM
https://www.youtube.com/watch?v=opcO5edCzZY


Mg Woman

ik its a varible

http://wiki.roblox.com/index.php?title=Making_an_onClicked_script


http://www.roblox.com/xla-item?id=290739801http://www.roblox.com/aser-item?id=290739819http://www.roblox.com/23-item?id=290739831 R$86 Tx914
Report Abuse
DexCubing is not online. DexCubing
Joined: 23 May 2010
Total Posts: 105
30 Aug 2015 10:38 PM
Then I have no idea what you are asking for.
Report Abuse
xlaser23 is not online. xlaser23
Joined: 10 Dec 2011
Total Posts: 20341
30 Aug 2015 10:42 PM
ok

let show u 2 expamples

instead of bin.Mouseclick

try

script.Parent.ClickDetector.MouseClick:connect(click)


http://www.roblox.com/xla-item?id=290739801http://www.roblox.com/aser-item?id=290739819http://www.roblox.com/23-item?id=290739831 R$86 Tx914
Report Abuse
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
30 Aug 2015 10:56 PM
Functionnane()
Report Abuse
zarman3402 is not online. zarman3402
Joined: 18 May 2013
Total Posts: 1449
30 Aug 2015 10:57 PM
You call the function when you friking click it.
Report Abuse
DexCubing is not online. DexCubing
Joined: 23 May 2010
Total Posts: 105
30 Aug 2015 10:58 PM
Oh man, I didn't mean the Mousebutton click. I was talking about the equip function.

local player = game.Players.LocalPlayer
local character = player.Character
local tool = player.Backpack.M4

function equip(tool)
tool.Parent = character
end
Report Abuse
zarman3402 is not online. zarman3402
Joined: 18 May 2013
Total Posts: 1449
30 Aug 2015 11:02 PM
The equip function is for what?
Report Abuse
DexCubing is not online. DexCubing
Joined: 23 May 2010
Total Posts: 105
30 Aug 2015 11:19 PM
A gun that came from lighting and to the player backpack.
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