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: FIX THIS SCRIPT

Previous Thread :: Next Thread 
Tsurra is not online. Tsurra
Joined: 30 Jan 2011
Total Posts: 495
18 Feb 2016 12:49 PM
game.Players.PlayerAdded:connect(function(player)
local record = Instance.new("StringValue")
record.Value = player.Name
record.Parent = Folder
end)

in the brick you'll want a humanoid or a surfacegui
while true do
wait(10)
local list = Folder:GetChildren
script.Parent.Name = list[math.random(1,#list)]
end

can anyone fix this script, I added this into a brick and added a surface gui,stringvalue,folder, it highlights the word "in", it doesn't work.
Report Abuse
Tsurra is not online. Tsurra
Joined: 30 Jan 2011
Total Posts: 495
18 Feb 2016 12:50 PM
or fix this game.Players.PlayerAdded:connect(function(player)
local record = Instance.new("StringValue")
record.Value = player.Name
record.Parent = the folder or model where you want to keep this stuff
end)

and in the brick you'll want a humanoid or a surfacegui
while true do
wait(10)
local list = folder or model where you keep the names:GetChildren
script.Parent.Name = list[math.random(1,#list)]
end

(folder or model name is "Brick")
Report Abuse
Darkenus is not online. Darkenus
Joined: 17 Jul 2014
Total Posts: 1997
18 Feb 2016 12:50 PM
"local list = Folder:GetChildren"

should be


local list = Folder:GetChildren()
Report Abuse
myactivetestplace is not online. myactivetestplace
Joined: 11 Jul 2015
Total Posts: 3733
18 Feb 2016 12:51 PM
Try

while true do
record.Value = player.Name
Report Abuse
Tsurra is not online. Tsurra
Joined: 30 Jan 2011
Total Posts: 495
18 Feb 2016 12:52 PM
:

game.Players.PlayerAdded:connect(function(player)
local record = Instance.new("StringValue")
record.Value = player.Name
record.Parent = Folder
end)


while true do
wait(10)
local list = Folder:GetChildren()
script.Parent.Name = list[math.random(1,#list)]
end

did this: now it highlights the word folder with blue color, and I did put stringvalue, folder, surfacegui into my brick, it still doesn't show anything on the brick
Report Abuse
Darkenus is not online. Darkenus
Joined: 17 Jul 2014
Total Posts: 1997
18 Feb 2016 12:54 PM
script.Parent.Name = list[math.random(1,#list)]

should be

script.Parent.Name = list[math.random(1,#list)].Value

because you want the VALUE of the item
Report Abuse
Tsurra is not online. Tsurra
Joined: 30 Jan 2011
Total Posts: 495
18 Feb 2016 12:55 PM
I did this:

game.Players.PlayerAdded:connect(function(player)
local record = Instance.new("StringValue")
while true do
record.Value = player.Name
record.Parent = Folder
end)


while true do
wait(10)
local list = Folder:GetChildren()
script.Parent.Name = list[math.random(1,#list)]
end

now it highlights the ")" next to the word "end"


output:

Workspace.Brick.Script:6: unexpected symbol near ')'
Report Abuse
AdvancedObjects is not online. AdvancedObjects
Joined: 11 Dec 2012
Total Posts: 3354
18 Feb 2016 12:56 PM
You forgot an 'end' to close your loop in the playeradded event.



Report Abuse
Darkenus is not online. Darkenus
Joined: 17 Jul 2014
Total Posts: 1997
18 Feb 2016 12:57 PM
jsut do this:


game.Players.PlayerAdded:connect(function(player)
local record = Instance.new("StringValue", Folder)
record.Value = player.Name
end)


while wait(10) do
local list = Folder:GetChildren()
script.Parent.Name = list[math.random(1,#list)].Value
end


--What it should do is change parent's name to one a random players name.
Report Abuse
Tsurra is not online. Tsurra
Joined: 30 Jan 2011
Total Posts: 495
18 Feb 2016 12:57 PM
did this:

game.Players.PlayerAdded:connect(function(player)
local record = Instance.new("StringValue")
record.Value = player.Name
record.Parent = Folder
end)


while true do
wait(10)
local list = Folder:GetChildren()
script.Parent.Name = list[math.random(1,#list)].Value
end

it highlights "Folder" words with blue color
Report Abuse
Darkenus is not online. Darkenus
Joined: 17 Jul 2014
Total Posts: 1997
18 Feb 2016 12:58 PM
Did you define 'Folder'?
Report Abuse
Tsurra is not online. Tsurra
Joined: 30 Jan 2011
Total Posts: 495
18 Feb 2016 12:59 PM
@Darkenus, I added that, it still highlights the words folder with blue color, don't really know if it is working
Report Abuse
AdvancedObjects is not online. AdvancedObjects
Joined: 11 Dec 2012
Total Posts: 3354
18 Feb 2016 01:00 PM
*double face palm*



Report Abuse
Tsurra is not online. Tsurra
Joined: 30 Jan 2011
Total Posts: 495
18 Feb 2016 01:00 PM
what do you mean with "define folder"
Report Abuse
AdvancedObjects is not online. AdvancedObjects
Joined: 11 Dec 2012
Total Posts: 3354
18 Feb 2016 01:01 PM
*triple face palm*



Report Abuse
Tsurra is not online. Tsurra
Joined: 30 Jan 2011
Total Posts: 495
18 Feb 2016 01:02 PM
advanced, I put a ")" to there, now it only red highlights that ")"
Report Abuse
Darkenus is not online. Darkenus
Joined: 17 Jul 2014
Total Posts: 1997
18 Feb 2016 01:03 PM
Ugh, just copy and paste your ENTIRE script so we can see.
Report Abuse
Tsurra is not online. Tsurra
Joined: 30 Jan 2011
Total Posts: 495
18 Feb 2016 01:04 PM
beginning: game.Players.PlayerAdded:connect(function(player))
local record = Instance.new("StringValue")
record.Value = player.Name
record.Parent = Brick23
end)

while true do
wait(10)
local list = Brick23:GetChildren
script.Parent.Name = list[math.random(1,#list)]
end


now: game.Players.PlayerAdded:connect(function(player))
local record = Instance.new("StringValue")
while true do
record.Value = player.Name
record.Parent = Folder
end)


while true do
wait(10)
local list = Folder:GetChildren()
script.Parent.Name = list[math.random(1,#list)]
end)


(highlights ")", (player)))
Report Abuse
Darkenus is not online. Darkenus
Joined: 17 Jul 2014
Total Posts: 1997
18 Feb 2016 01:05 PM
*sigh*

1. You did not define 'Folder'.

2. 'script.Parent.Name' points to the script's NAME, so all you're doing is changing the scripts name.
Report Abuse
Tsurra is not online. Tsurra
Joined: 30 Jan 2011
Total Posts: 495
18 Feb 2016 01:09 PM
just this:

game.Players.PlayerAdded:connect(function(player))
local record = Instance.new("StringValue")
while true do
record.Value = player.Name
record.Parent = Folder
end)


while true do
wait(10)
local list = Folder:GetChildren()
script.Parent.Script = list[math.random(1,#list)]
end)
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