A Roblox Community

A community of Robloxians who want to learn to script and build on Roblox Studio.
 
HomeFAQRegisterLog in
If you're a experienced coder make some tutorials! It would really help the site grow.
Make sure you read the rules(Which can be found by clicking here)
If you're a beginner at coding, try some tutorials.
We have many Moderators/Admins watching this site. Contact them with Questions.
Let us know what your favorite sport is. By clicking here to vote (Click here)
This site is becoming inactive. Lets make it active.
Log in
Username:
Password:
Log in automatically: 
:: I forgot my password
Top posters
blueymaddog
 
naknak
 
Supernapalm
 
m27frogy
 
slayer9365
 
myrco919
 
branefreez
 
ninga95
 
CloneTrooper787
 
raboy117
 
Top posting users this month
Latest topics
» Send me an Email
January 8th 2016, 10:14 am by naknak

» [v1.6.0.0] Lua Script Obfuscator [No Bytecode]
July 6th 2015, 7:38 pm by m27frogy

» New Site Possibly
July 6th 2015, 4:16 pm by m27frogy

» Ambassador!
April 15th 2015, 11:40 pm by naknak

» Boop - Tag
April 13th 2015, 9:46 pm by naknak

» Vip Class Script
April 13th 2015, 4:54 pm by naknak

» Who's active?!
April 13th 2015, 4:52 pm by naknak

» Where to go from here.
April 13th 2015, 4:51 pm by naknak

» Genesis Point
July 17th 2014, 7:04 pm by branefreez

» Reward System
July 17th 2014, 5:41 am by m27frogy

» Script Request
July 10th 2014, 11:43 am by naknak

» local scripts?
July 10th 2014, 11:39 am by naknak

» Project: Reconstruction [Died]
July 10th 2014, 11:36 am by naknak

» Hi. I am new here
April 26th 2014, 4:01 pm by altshiftkey

» What's your favorite sport?
January 1st 2014, 2:13 pm by m27frogy

» FlashLight Script
January 1st 2014, 2:11 pm by m27frogy

» Gun Making! [READ DESC]
January 1st 2014, 2:10 pm by m27frogy

» Hi, I am new here!
November 26th 2013, 3:33 pm by Keanu73

» Improve Coding
October 26th 2013, 1:12 pm by pook03

» Simple Button
September 1st 2013, 6:19 pm by branefreez


Share | 
 

 How Can I Improve This Script?

View previous topic View next topic Go down 
AuthorMessage
Sethalonian
Intermediate Scripter
Intermediate Scripter
avatar

Posts : 63
Join date : 2011-06-10
Age : 19

PostSubject: How Can I Improve This Script?   July 3rd 2011, 3:35 pm

It doesn't even work, but the idea is close.... sorta. If you know how to fix/Improve it then please tell. I made the script myself, i just copied the connection line stuff cause' i've not really done any message scripts before.

Team Creator Script

ok = false
function onChatted(msg, speaker)

if (msg:sub(1,7) == "create/") then
for i,v in pairs(game.Teams:GetChildren()) do
if v.TeamColor ~= speaker.TeamColor then
ok = true
end
end
if ok == true then
t = Instance.new"Team"
t.Name = msg:sub(8,18)
t.Parent = game.Teams
owner = Instance.new"StringValue"
owner.Name = "Owner"
owner.Value = speaker.Name
end
elseif (msg:sub(1,5) == "name/") then
for i,v in pairs(game.Teams:GetChildren()) do
if v.Owner.Value == speaker.Name then
v.Name = msg:sub(6,16)
end
end
elseif (msg:sub(1,5) == "color/") then
for i,v in pairs(game.Teams:GetChildren()) do
if v.Owner.Value == speaker.Name then
v.TeamColor = BrickColor.new(msg:sub(6,20))
end
end
end
end

function onPlayerEntered(newPlayer)
newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, newPlayer) end)
end

game.Players.ChildAdded:connect(onPlayerEntered)
Back to top Go down
Sethalonian
Intermediate Scripter
Intermediate Scripter
avatar

Posts : 63
Join date : 2011-06-10
Age : 19

PostSubject: Re: How Can I Improve This Script?   July 6th 2011, 10:05 am

Anyone?
Back to top Go down
naknak
Administrator
Administrator
avatar

Posts : 878
Join date : 2010-07-30

PostSubject: Re: How Can I Improve This Script?   July 6th 2011, 2:47 pm

I'll try and help later, currently I don't have any access to roblox.
Back to top Go down
m27frogy
The Garbageman
avatar

Posts : 336
Join date : 2011-06-23

PostSubject: Re: How Can I Improve This Script?   July 7th 2011, 10:08 am

Sorry, I can't help. I can't work with the Chatted events...
Back to top Go down
Sethalonian
Intermediate Scripter
Intermediate Scripter
avatar

Posts : 63
Join date : 2011-06-10
Age : 19

PostSubject: Re: How Can I Improve This Script?   July 7th 2011, 12:34 pm

Thanks it is not really necessary. I was just trying to make a fun thing in-game. Naknak you are really smart! Are you in college?
Back to top Go down
Supernapalm
Expert Scripter
Expert Scripter


Posts : 393
Join date : 2011-01-17

PostSubject: Re: How Can I Improve This Script?   July 7th 2011, 5:20 pm

i think this it a big problem. syntax error, idk, only looked at the script for a few seconds...
Code:
function onPlayerEntered(newPlayer)
newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, newPlayer) end)
end
maybe if u fix this up a bit
Back to top Go down
http://hackthissite.org
naknak
Administrator
Administrator
avatar

Posts : 878
Join date : 2010-07-30

PostSubject: Re: How Can I Improve This Script?   July 7th 2011, 10:17 pm

No, but I am smarter than the average guy
Back to top Go down
m27frogy
The Garbageman
avatar

Posts : 336
Join date : 2011-06-23

PostSubject: Re: How Can I Improve This Script?   July 8th 2011, 11:44 am

Same.
Back to top Go down
Supernapalm
Expert Scripter
Expert Scripter


Posts : 393
Join date : 2011-01-17

PostSubject: Re: How Can I Improve This Script?   July 8th 2011, 8:36 pm

hey. now that i notice ur title (lol) i just wanted to point out that i actually thought about making a script like this for some strategy war game. just... just saying. dont panic
Back to top Go down
http://hackthissite.org
Sethalonian
Intermediate Scripter
Intermediate Scripter
avatar

Posts : 63
Join date : 2011-06-10
Age : 19

PostSubject: Re: How Can I Improve This Script?   July 11th 2011, 11:25 am

This place is so much nicer then the roblox forums.
Back to top Go down
m27frogy
The Garbageman
avatar

Posts : 336
Join date : 2011-06-23

PostSubject: Re: How Can I Improve This Script?   July 11th 2011, 5:18 pm

We try to be. Send me a PM with any questions either here or on ROBLOX.
Back to top Go down
naknak
Administrator
Administrator
avatar

Posts : 878
Join date : 2010-07-30

PostSubject: Re: How Can I Improve This Script?   July 12th 2011, 5:03 pm

Roblox's forumers are too judgemental
Back to top Go down
blueymaddog
Administrator
Administrator
avatar

Posts : 1081
Join date : 2010-12-09
Age : 19

PostSubject: Re: How Can I Improve This Script?   February 4th 2012, 7:27 am

don't ya think that sentance is a bit hypocritical?
I think that this site is better for help because it isn't filled with noobs that spam...

_________________
blueymaddog
Administrator • Moderator • Expert Scripter
PM: blueymaddog
<+1 post. ujelly?>
Back to top Go down
Sethalonian
Intermediate Scripter
Intermediate Scripter
avatar

Posts : 63
Join date : 2011-06-10
Age : 19

PostSubject: Re: How Can I Improve This Script?   February 4th 2012, 11:19 am

XD true true
Back to top Go down
blueymaddog
Administrator
Administrator
avatar

Posts : 1081
Join date : 2010-12-09
Age : 19

PostSubject: Re: How Can I Improve This Script?   February 4th 2012, 11:24 am

lol we need more members so there is like at least 1 person on at any one time :3

_________________
blueymaddog
Administrator • Moderator • Expert Scripter
PM: blueymaddog
<+1 post. ujelly?>
Back to top Go down
Sponsored content




PostSubject: Re: How Can I Improve This Script?   

Back to top Go down
 
How Can I Improve This Script?
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Chess Script
» What do you think Bearville should improve on?
» Autohotkey script for melee barbarian
» Improve your ping in China even to EU/US/Taiwan server
» Awesome (FREE) gun script!

Permissions in this forum:You cannot reply to topics in this forum
A Roblox Community :: Questions and Help :: Scripting-
Jump to: