gus4152
|
  |
| Joined: 14 Apr 2009 |
| Total Posts: 2215 |
|
|
| 03 Feb 2014 03:23 PM |
sender = game.Players.LocalPlayer.Chatted:connect(onChatted) currentwep = sender.Weapon.Value
event onChatted("1") sender.currentwep = 1 end
event onChatted("2") sender.currentwep = 2 end
event onChatted("3") sender.currentwep = 3 end
event onChatted("4") sender.currentwep = 4 end
event onChatted("5") sender.currentwep = 5 end
~ער זאָל טרינקען אויך פיל קאַסטער ייל.~ |
|
|
| Report Abuse |
|
|
| |
|
domorox17
|
  |
| Joined: 06 Mar 2012 |
| Total Posts: 1710 |
|
| |
|
gus4152
|
  |
| Joined: 14 Apr 2009 |
| Total Posts: 2215 |
|
|
| 03 Feb 2014 03:26 PM |
@Coolio
this is incredibly unhelpful.
you didn't even tell me how to kill the purple dragon.
~ער זאָל טרינקען אויך פיל קאַסטער ייל.~ |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2014 03:27 PM |
So sorry, man
http://www.roblox.com/Forum/ShowPost.aspx?PostID=124794424 |
|
|
| Report Abuse |
|
|
gus4152
|
  |
| Joined: 14 Apr 2009 |
| Total Posts: 2215 |
|
|
| 03 Feb 2014 03:27 PM |
I made this script on a computer with no internet and no roblox.
of course the syntax is incorrect.
how do I use the onchatted event to change an intvalue?
~ער זאָל טרינקען אויך פיל קאַסטער ייל.~ |
|
|
| Report Abuse |
|
|
domorox17
|
  |
| Joined: 06 Mar 2012 |
| Total Posts: 1710 |
|
|
| 03 Feb 2014 03:28 PM |
| The syntax is not correct for Lua. |
|
|
| Report Abuse |
|
|
gus4152
|
  |
| Joined: 14 Apr 2009 |
| Total Posts: 2215 |
|
|
| 03 Feb 2014 03:32 PM |
@domo
I've gathered that.
how would I use the onchatted event to change an IntValue?
~ער זאָל טרינקען אויך פיל קאַסטער ייל.~ |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2014 03:34 PM |
plyr.Chatted:connect(function(chat) IntValue.Value = 9001 )
So easy. |
|
|
| Report Abuse |
|
|
Ekkoh
|
  |
| Joined: 22 Oct 2012 |
| Total Posts: 524 |
|
|
| 03 Feb 2014 03:36 PM |
You clearly don't have an understanding of how Lua syntax works. I'll give you this.
function Chatted(plr, chat) print(plr.Name .. " said '" .. chat .. "'") if chat == "1" then -- code end end
Game:GetService("Players").PlayerAdded:connect(function(plr) plr.Chatted:connect(function(chat) Chatted(plr, chat) end) end)
"We can walk a million miles, and end up in the sea." - George Ragan aka Johnny 3 Tears |
|
|
| Report Abuse |
|
|
gus4152
|
  |
| Joined: 14 Apr 2009 |
| Total Posts: 2215 |
|
|
| 03 Feb 2014 03:38 PM |
I need it so if you chat a certain number, the intValue changes to the corresponding number. (and i'm just doing it "if chat.content = 'a number' then int.value = 'something else')
~ער זאָל טרינקען אויך פיל קאַסטער ייל.~ |
|
|
| Report Abuse |
|
|
Ekkoh
|
  |
| Joined: 22 Oct 2012 |
| Total Posts: 524 |
|
|
| 03 Feb 2014 03:42 PM |
You gotta put forth some effort here, not all of us will make scripts for you.
wait() local Player = Game:GetService("Players").LocalPlayer local Wep = Player.Weapon Player.Chatted:connect(function(chat) if tonumber(chat) then Wep.Value = tonumber(chat) end end)
"We can walk a million miles, and end up in the sea." - George Ragan aka Johnny 3 Tears |
|
|
| Report Abuse |
|
|
gus4152
|
  |
| Joined: 14 Apr 2009 |
| Total Posts: 2215 |
|
|
| 03 Feb 2014 03:43 PM |
okay, a better explanation of what' going on here.
I'm making a game using the 2008 roblox studio (which means NO RECENTLY ADDED FUNCTIONS WILL WORK) and this script in specific is supposed to do the following-
-Look to see if somebody is saying 1,2,3,4 or 5 in the chat
-if they say 1, convert an IntValue located @ game.Players.[I need to know how to determine who chatted what too] to 1. if they say 2, convert the value to 2, and so on.
~ער זאָל טרינקען אויך פיל קאַסטער ייל.~ |
|
|
| Report Abuse |
|
|
domorox17
|
  |
| Joined: 06 Mar 2012 |
| Total Posts: 1710 |
|
|
| 03 Feb 2014 03:45 PM |
| How did you get the 2008 studio? If you habe an old version, it auto updates. |
|
|
| Report Abuse |
|
|
Ekkoh
|
  |
| Joined: 22 Oct 2012 |
| Total Posts: 524 |
|
|
| 03 Feb 2014 03:46 PM |
Assuming there is an IntValue 'Weapon' in each player, mine should work fine.
"We can walk a million miles, and end up in the sea." - George Ragan aka Johnny 3 Tears |
|
|
| Report Abuse |
|
|
gus4152
|
  |
| Joined: 14 Apr 2009 |
| Total Posts: 2215 |
|
|
| 03 Feb 2014 03:51 PM |
@domo
a while ago, you would download the roblox client from a .exe installer (requires administrative permissions) to C://Documents and Settings/All Users/AppData and it did not have auto-update capabilites. The installer was only recently removed from the site, having been hidden, but not before some people got a hold of it and used it to make roblox private server hosting. (it's called RBLXDev, look it up.)
~ער זאָל טרינקען אויך פיל קאַסטער ייל.~ |
|
|
| Report Abuse |
|
|
gus4152
|
  |
| Joined: 14 Apr 2009 |
| Total Posts: 2215 |
|
|
| 03 Feb 2014 03:54 PM |
while i'm here, another script I want you to proof-read for me.
level = script.Parent.KOs.Value cap = ("www.roblox.com/assetID=?") --Roblox baseball cap gibus = ("www.roblox.com/assetID=?") --Busted top hat valkhelm = ("www.roblox.com/assetID=?") --Valkyrie Helm fedora = ("www.roblox.com/assetID=?") --Classic ROBLOX fedora squid = ("www.roblox.com/assetID=?")--Mr. Tentacles tophat = ("www.roblox.com/assetID=?") --Purple Banded Top Hat hat = script.Parent.CharacterAppearance trowel1 = game.Lighting.TrowelUpgrade1 trowel2 = game.Lighting.TrowelUpgrade2 trowel3 = game.Lighting.TrowelUpgrade3 rocketb = game.Lighing.RocketLauncherUpgrade trowel = script.Parent.Backpack.Trowel rocket = script.Parent.Backpack.Rocket
if level > 5 then hat = cap end
if level > 10 then trowel.children:remove() newstuff = trowel1.children:clone() --needs to be cleaned up? newstuff.Parent = trowel hat = gibus end
if level > 15 then hat = valkhelm end
if level > 20 then trowel.children:remove() newstuff2 = trowel2.children:clone() --needs to be cleaned up? newstuff2.Parent = trowel hat = fedora end
if level > 25 then rocket.children:remove() newstuff3 = rocketb.children:clone() --needs to be cleaned up? newstuff3.Parent = rocket hat = squid end
if level > 30 then trowe1.children:remove() newstuff4 = trowel3.children:clone() --needs to be cleaned up? newstuff4.Parent = trowel hat = tophat end
~ער זאָל טרינקען אויך פיל קאַסטער ייל.~ |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 03 Feb 2014 04:04 PM |
Should've put it in a new thread, but I will tell you that you can't refer to all the children like that.
for i,children in pairs (trowel3:GetChildren ()) do children:Clone ().Parent = trowel -- this saves a line. It's legit, trust me end |
|
|
| Report Abuse |
|
|