of     1   

Cartoonfive
#182309349Sunday, January 24, 2016 3:32 PM GMT

I tried everything. Using onplayeradded, getplayerfromcharacter, everything. What do i do..
BanTech
#182309554Sunday, January 24, 2016 3:35 PM GMT

for _, player in pairs(game.Players:GetChildren()) do --do stuff end
Cartoonfive
#182309829Sunday, January 24, 2016 3:39 PM GMT

I tried this: for _, player in pairs(game.Players:GetChildren()) do local a = game.Lighting.LinkedSword:Clone() a.Parent = player.Backpack a:MakeJoints() end i have no idea what the pairs stuff is and all that, but when i ran the game it didnt even print an error. just nothing happened.
BanTech
#182310050Sunday, January 24, 2016 3:42 PM GMT

Hold on, is this script running straight away? If so then why even use a script when you have StarterPack?
killerbot29003
#182313269Sunday, January 24, 2016 4:32 PM GMT

Try this: for i,v in pairs(game.Players:GetChildren()) do local a = game.Lighting.LinkedSword:Clone() a.Parent = v.Backpack a:MakeJoints() end I didn't use studio for testing this so this may be wrong This siggy is copyrighted ©
Soybeen
#182313483Sunday, January 24, 2016 4:35 PM GMT

killer, what is :MakeJoints() supposed to do in that code? curious
Cartoonfive
#182335201Sunday, January 24, 2016 9:30 PM GMT

sorry that i didnt respond. i had to shovel snow, and then got picked up by my dad and had to go sledding. No, the script doesnt run immediately, i just want it to happen when its activated.
Cartoonfive
#182335310Sunday, January 24, 2016 9:32 PM GMT

killer, like bantechs, the script didnt print an error but didnt do anything either.
cgjnm
#182335727Sunday, January 24, 2016 9:37 PM GMT

function Tools() for i,v in pairs(game.Players:GetPlayers())do Tool:Clone().Parent = v.Backpack end end --Make sure to call the function with: Tools() If you are trying to call it from a separate script, try this: _G.Tools = function() for i,v in pairs(game.Players:GetPlayers())do Tool:Clone().Parent = v.Backpack end end And you can call it from other scripts using: _G.Tools()
Cartoonfive
#182336157Sunday, January 24, 2016 9:43 PM GMT

Ok. Let me try to explain this in the greatest detail possible This script, local Tool = game.Lighting.LinkedSword function Tools() for i,v in pairs(game.Players:GetPlayers())do Tool:Clone().Parent = v.Backpack end end Tools() Did not work. Didnt print an error but AGAIN... did nothing. Ok so listen: -Im using a server script. -The script is in the Workspace. -The tool im cloning, LinkedSword, is in the Lighting. -What i want is when the script is activated, the tool is cloned from the lighting, and placed into the players backpack. -In all 3 scripts i saw, no errors were printed but nothing happened. -There will really only be 1 player in a server at a time. Its a single player game, so i figured it didnt matter if i used a get ALL players thing. If you have any other questions ill try to answer... so what the heck is going on??
cgjnm
#182336830Sunday, January 24, 2016 9:52 PM GMT

local Tool = game.Lighting:FindFirstChild'LinkedSword' function Tools() print'Function called' for i,v in pairs(game.Players:GetPlayers())do print'adding tool' Tool:Clone().Parent = v.Backpack print'added tool' end end Tools()
Cartoonfive
#182337437Sunday, January 24, 2016 10:01 PM GMT

it stopped at function called.
FrostOver
#182337458Sunday, January 24, 2016 10:01 PM GMT

put your tools in serverstorage not lighting you scrubs
cgjnm
#182337515Sunday, January 24, 2016 10:02 PM GMT

Are you actually in the game (test mode) or are you running it?
cgjnm
#182337563Sunday, January 24, 2016 10:03 PM GMT

There actually needs to be players to work..
Cartoonfive
#182337745Sunday, January 24, 2016 10:05 PM GMT

im using test mode. im not stupid, lol
cgjnm
#182338731Sunday, January 24, 2016 10:19 PM GMT

Maybe add a wait() after for i,v in pairs do?

    of     1