Skyman772
#155844603Friday, February 13, 2015 1:49 AM GMT

This common debounce function! function debounce(func) local isRunning = false return function(...) if not isRunning then isRunning = true func(...) isRunning = false end end end
Seranok
#155844733Friday, February 13, 2015 1:51 AM GMT

128GB: If the player's aren't on a team, then why the heck is your function about getting players on a team? Skyman772: Okay, I will add debounce.
bosswalrus
#155844735Friday, February 13, 2015 1:51 AM GMT

Player team changing. "I like to program." - Bosswalrus
bosswalrus
#155844837Friday, February 13, 2015 1:52 AM GMT

Woops didn't know you put that in. "I like to program." - Bosswalrus
128GB
#155844853Friday, February 13, 2015 1:52 AM GMT

Because it gets players with that TeamColor And if you set the second argument to not nil, it gets the neutral ones too (If you leave it nil then it only gets ones that aren't neutral)
bosswalrus
#155844946Friday, February 13, 2015 1:53 AM GMT

Perhaps how to detect KeyHolding. "I like to program." - Bosswalrus
Refactor
#155844983Friday, February 13, 2015 1:54 AM GMT

--[[ http://lua-users.org/wiki/SimpleRound --]] function round(num, idp) local mult = 10^(idp or 0) return math.floor(num * mult + 0.5) / mult end
AbstractMadness
#155844998Friday, February 13, 2015 1:54 AM GMT

^ that's just debounces
bosswalrus
#155845055Friday, February 13, 2015 1:55 AM GMT

I don't know what you should add. "I like to program." - Bosswalrus
AbstractMadness
#155845075Friday, February 13, 2015 1:55 AM GMT

i meant @boss
bosswalrus
#155845187Friday, February 13, 2015 1:56 AM GMT

Mouse.Target code snippets? "I like to program." - Bosswalrus
bosswalrus
#155845580Friday, February 13, 2015 2:01 AM GMT

Teleporting players to different places? "I like to program." - Bosswalrus
128GB
#155845594Friday, February 13, 2015 2:02 AM GMT

@Refact local function round(x, y) return (math.floor((x / (y or 1)) + 0.5) * (y or 1)); end print(round(0.3)) -->0 print(round(0.5)) -->1 print(round(2.3, 4)) -->4 print(round(6.1, 4)) -->8
bosswalrus
#155845725Friday, February 13, 2015 2:03 AM GMT

Giving a hat/gear/whatever to a Player's Character with that InsertService or AssetService thingy. "I like to program." - Bosswalrus
128GB
#155845842Friday, February 13, 2015 2:04 AM GMT

function getHat(id) if game:GetService("MarketplaceService"):GetProductInfo(tonumber(id)).AssetTypeId == 8 then return game:GetService("InsertService"):LoadAsset(tonumber(id)):GetChildren()[1] end return nil end
MilkTreatGolem
#155846006Friday, February 13, 2015 2:07 AM GMT

[ Content Deleted ]
Seranok
#155846186Friday, February 13, 2015 2:09 AM GMT

MilkTreatGolem: Okay fixed
bosswalrus
#155846259Friday, February 13, 2015 2:10 AM GMT

Disabling jump. "I like to program." - Bosswalrus
bosswalrus
#155846600Friday, February 13, 2015 2:14 AM GMT

Giving a shirt and pants to a Character and removing their current ones. People ask for that script all the time(Uniform script). "I like to program." - Bosswalrus
AbstractMadness
#155846716Friday, February 13, 2015 2:15 AM GMT

There is a way without doing the for loop and finding the hat in the model.
Seranok
#155846765Friday, February 13, 2015 2:16 AM GMT

@AbstractMadness How? In some hats, the first instance is not a hat, it's a thumbnail camera or something else.
bosswalrus
#155846839Friday, February 13, 2015 2:17 AM GMT

A giver that gives the Character a tool, this is also asked a lot. "I like to program." - Bosswalrus
AbstractMadness
#155846840Friday, February 13, 2015 2:17 AM GMT

The thumbnail camera is inside the hat itself, if I'm correct. There was another way to load the asset though, without it being a model. I forgot how though, sorry.
warspyking
#155846853Friday, February 13, 2015 2:17 AM GMT

function WhileKeyHeldDown(key, func) local mouse = game.Players.LocalPlayer:GetMouse() mouse.KeyDown:connect(function(k) if k == key:lower() then local b = false local Connection = mouse.KeyUp:connect(function(kk) if kk == key:lower() then b = true end end) while not b do game:GetService("RunService").RenderStepped:wait() func() end Connection:disconnect() end end) end --Please test this first, usage: WhileKeyHeldDown("k", function() print("Hello") end) --Must only be called in a LocalScript
AbstractMadness
#155846991Friday, February 13, 2015 2:18 AM GMT

@war TAB TAB TAB PLS