| How Can I Improve This Script? | |
|
|
Author | Message |
---|
Sethalonian Intermediate Scripter
Posts : 63 Join date : 2011-06-10 Age : 26
| Subject: 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)
| |
|
| |
Sethalonian Intermediate Scripter
Posts : 63 Join date : 2011-06-10 Age : 26
| Subject: Re: How Can I Improve This Script? July 6th 2011, 10:05 am | |
| | |
|
| |
naknak Administrator
Posts : 878 Join date : 2010-07-30
| Subject: 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. | |
|
| |
m27frogy The Garbageman
Posts : 336 Join date : 2011-06-23
| Subject: 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... | |
|
| |
Sethalonian Intermediate Scripter
Posts : 63 Join date : 2011-06-10 Age : 26
| Subject: 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? | |
|
| |
Supernapalm Expert Scripter
Posts : 393 Join date : 2011-01-17
| Subject: 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 | |
|
| |
naknak Administrator
Posts : 878 Join date : 2010-07-30
| Subject: Re: How Can I Improve This Script? July 7th 2011, 10:17 pm | |
| No, but I am smarter than the average guy | |
|
| |
m27frogy The Garbageman
Posts : 336 Join date : 2011-06-23
| Subject: Re: How Can I Improve This Script? July 8th 2011, 11:44 am | |
| | |
|
| |
Supernapalm Expert Scripter
Posts : 393 Join date : 2011-01-17
| Subject: 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 | |
|
| |
Sethalonian Intermediate Scripter
Posts : 63 Join date : 2011-06-10 Age : 26
| Subject: Re: How Can I Improve This Script? July 11th 2011, 11:25 am | |
| This place is so much nicer then the roblox forums. | |
|
| |
m27frogy The Garbageman
Posts : 336 Join date : 2011-06-23
| Subject: 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. | |
|
| |
naknak Administrator
Posts : 878 Join date : 2010-07-30
| Subject: Re: How Can I Improve This Script? July 12th 2011, 5:03 pm | |
| Roblox's forumers are too judgemental | |
|
| |
blueymaddog Administrator
Posts : 1081 Join date : 2010-12-09 Age : 25
| Subject: 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... | |
|
| |
Sethalonian Intermediate Scripter
Posts : 63 Join date : 2011-06-10 Age : 26
| Subject: Re: How Can I Improve This Script? February 4th 2012, 11:19 am | |
| | |
|
| |
blueymaddog Administrator
Posts : 1081 Join date : 2010-12-09 Age : 25
| Subject: 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 | |
|
| |
Sponsored content
| Subject: Re: How Can I Improve This Script? | |
| |
|
| |
| How Can I Improve This Script? | |
|