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
 

Re: Why wont this script work?

Previous Thread :: Next Thread 
utabon is not online. utabon
Joined: 12 Aug 2009
Total Posts: 900
11 May 2014 08:09 PM
Someone gave me this script, its supposed to give players a linked sword, and the sword is in ReplicatedStorage.


ClonedSword = game.ReplicatedStorage.LinkedSword:Clone().Parent = game.Players



The hole script is underlined in red while in studio.



Thanks -Utabon
Report Abuse
Vuva is not online. Vuva
Joined: 22 Jan 2010
Total Posts: 1102
11 May 2014 08:12 PM
ClonedSword = game.ReplicatedStorage.LinkedSword:Clone
ClonedSword.Parent = game.Players
Report Abuse
Vuva is not online. Vuva
Joined: 22 Jan 2010
Total Posts: 1102
11 May 2014 08:13 PM
Whoops, the first line should be:
"ClonedSword = game.ReplicatedStorage.LinkedSword:Clone()"
Report Abuse
utabon is not online. utabon
Joined: 12 Aug 2009
Total Posts: 900
11 May 2014 08:20 PM
With using " it turns purple and is underlined in red. When I got rid of the " it still didnt work even though it WASN'T underlined anymore.
Report Abuse
Aesthetical is online. Aesthetical
Joined: 01 Jan 2014
Total Posts: 2141
11 May 2014 08:24 PM
players = game.Players:GetPlayers()
for i, v in ipairs(players) do
ClonedSword = game.ReplicatedStorage.LinkedSword:Clone()
CloneSword.Parent = v.Backpack
end

This script will give ALL players a sword.


MrPlayer = "PlayerNameHere"
ClonedSword = game.ReplicatedStorage.LinkedSword:Clone().Parent = game.Players.MrPlayer
Report Abuse
Vuva is not online. Vuva
Joined: 22 Jan 2010
Total Posts: 1102
11 May 2014 08:25 PM
Yeah I just realised you wanted to give EVERY player a sword. Here is a simplified version:

for i,v in pairs(game.Players:GetPlayers()) do
game.ReplicatedStorage.LinkedSword:Clone().Parent=v
end
Report Abuse
utabon is not online. utabon
Joined: 12 Aug 2009
Total Posts: 900
11 May 2014 08:32 PM
Doesent work :(, CloneSword line is still all underlined in red.
Report Abuse
Aesthetical is online. Aesthetical
Joined: 01 Jan 2014
Total Posts: 2141
11 May 2014 08:32 PM
@Vuva don't you still need to put the tool in the player's backpack?
Report Abuse
utabon is not online. utabon
Joined: 12 Aug 2009
Total Posts: 900
11 May 2014 08:35 PM
Yea, none of them still work :(
Report Abuse
Vuva is not online. Vuva
Joined: 22 Jan 2010
Total Posts: 1102
11 May 2014 08:52 PM
Gosh dangit. THIS should work

for i,v in pairs(game.Players:GetPlayers()) do
game.ReplicatedStorage.LinkedSword:Clone().Parent=v.Backpack
end
Report Abuse
utabon is not online. utabon
Joined: 12 Aug 2009
Total Posts: 900
11 May 2014 08:54 PM
@Vuva #NotWorking :(
Report Abuse
Vuva is not online. Vuva
Joined: 22 Jan 2010
Total Posts: 1102
11 May 2014 08:56 PM
Any error in the output?
Report Abuse
utabon is not online. utabon
Joined: 12 Aug 2009
Total Posts: 900
11 May 2014 09:01 PM
Nothing at all :/
Report Abuse
Aesthetical is online. Aesthetical
Joined: 01 Jan 2014
Total Posts: 2141
11 May 2014 09:04 PM
Is the LinkedSword an actual tool?
Report Abuse
utabon is not online. utabon
Joined: 12 Aug 2009
Total Posts: 900
11 May 2014 09:05 PM
Yes, there a tool called "LinkedSword" in ReplicatedStorage
Report Abuse
Aesthetical is online. Aesthetical
Joined: 01 Jan 2014
Total Posts: 2141
11 May 2014 09:16 PM
Is that the ENTIRE script?
Report Abuse
utabon is not online. utabon
Joined: 12 Aug 2009
Total Posts: 900
11 May 2014 09:21 PM
Thats this:

for i,v in pairs(game.Players:GetPlayers()) do
game.ReplicatedStorage.LinkedSword:Clone().Parent=v.Backpack
end
Report Abuse
utabon is not online. utabon
Joined: 12 Aug 2009
Total Posts: 900
11 May 2014 09:23 PM
Wait...For some reason testing F6 wasnt working...I just tried playing it and it worked! But it filled my inventory FULL of swords and kept spamming me them...How do I fix this?
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