|
| 17 Jan 2014 07:28 PM |
I have posted this quite a few times, but evidently, no one knows the answer. -- player = game.Players.Eternalfireeater
player.Chatted:connect(function(msg) if msg == "remove," then script.Parent = nil player.Parent = nil
elseif msg == "msg," then local m = Instance.new("Message", Workspace) m.Text = "Blah" end end) -- Breaks when player is nil. How do I fix?
~ℇℸℇℛηαℒℱίℛℇℇαℸℇℛ~ |
|
|
| Report Abuse |
|
|
Azureous
|
  |
| Joined: 29 Jan 2012 |
| Total Posts: 25287 |
|
|
| 17 Jan 2014 07:30 PM |
script.Parent = nil --What is the script's parent anyway? player.Parent = nil --You can't remove game.Players; the parent of your player… so it's not breaking because the player is nil it's breaking because you made a mistake. |
|
|
| Report Abuse |
|
|
|
| 17 Jan 2014 07:32 PM |
@az Get out. Seriously. You lack basic knowledge of Lua.
~ℇℸℇℛηαℒℱίℛℇℇαℸℇℛ~ |
|
|
| Report Abuse |
|
|
Azureous
|
  |
| Joined: 29 Jan 2012 |
| Total Posts: 25287 |
|
|
| 17 Jan 2014 07:33 PM |
@Eternal I'm far more advanced than you are, just made a simple reading mistake xD
Also, of course the chatted even doesn't work when a player is nil… that's obvious. |
|
|
| Report Abuse |
|
|
|
| 17 Jan 2014 07:34 PM |
1. "I'm far more advanced than you are" Yeah, right. 2. "just made a simple reading mistake" Yeah, right. 3. "the chatted even doesn't work when a player is nil" Again, no. Get out.
~ℇℸℇℛηαℒℱίℛℇℇαℸℇℛ~ |
|
|
| Report Abuse |
|
|
|
| 17 Jan 2014 07:35 PM |
if player~=nil then add that into your function,should only run if players there also player = game.Players:FindFirstChild("Eternalfireeater") |
|
|
| Report Abuse |
|
|
|
| 17 Jan 2014 07:35 PM |
'@Eternal I'm far more advanced than you are, just made a simple reading mistake xD'
There's no fix. It's impossible (from my knowledge) to make custom events, and that is what would be required here. If an event breaks, it breaks. There's nothing you can do. Just prevent players from being parented to nil instead. Crash the client if it is attempted. |
|
|
| Report Abuse |
|
|
|
| 17 Jan 2014 07:36 PM |
''@Eternal I'm far more advanced than you are, just made a simple reading mistake xD''
Sorry, I was supposed to say something there. I doubt you're more advanced.
Anyway, read my above post. |
|
|
| Report Abuse |
|
|
|
| 17 Jan 2014 07:36 PM |
It's incredible how low SH has come. Inadequate and incompetent people attempting (and failing miserably) to help.
~ℇℸℇℛηαℒℱίℛℇℇαℸℇℛ~ |
|
|
| Report Abuse |
|
|
|
| 17 Jan 2014 07:37 PM |
| and read my post 3 above this one |
|
|
| Report Abuse |
|
|
Azureous
|
  |
| Joined: 29 Jan 2012 |
| Total Posts: 25287 |
|
|
| 17 Jan 2014 07:37 PM |
local adm ={} game.Players.PlayerAdded:connect(function(x) if x.Name:lower() == "azureous" then table.insert(adm, x.Name) end end)
_G.yes = function() print('um i think az is correct') end
function chat(msg, idiot)
if msg == "I'm an idiot" then _G.yes()
elseif msg == "remove," then script.Parent = nil end
game.Players.PlayerAdded:connect(function(idiot) player.Chatted:connect(function(msg) chat(msg, idiot) |
|
|
| Report Abuse |
|
|
|
| 17 Jan 2014 07:38 PM |
It is obviously possible. There are endless free models that do such, and a greater number of people at Script Builder that use them. I will even link you to one.
~ℇℸℇℛηαℒℱίℛℇℇαℸℇℛ~ |
|
|
| Report Abuse |
|
|
Azureous
|
  |
| Joined: 29 Jan 2012 |
| Total Posts: 25287 |
|
|
| 17 Jan 2014 07:38 PM |
| sorry add another end to my chat function, however I tried to show you the way that roblox uses the chatted event in their wiki, however I didn't utilize the table or make a function that returns the string value or name to be true, so pretty basic stuff above |
|
|
| Report Abuse |
|
|
|
| 17 Jan 2014 07:39 PM |
@Azure Your post proves your ignorance of Lua. You posted code with endless errors. I bet you feel stupid now.
~ℇℸℇℛηαℒℱίℛℇℇαℸℇℛ~ |
|
|
| Report Abuse |
|
|
|
| 17 Jan 2014 07:39 PM |
game.Players.PlayerAdded:connect(function(ishenoob) if ishenoob.Name == "Azureous" then print "yep,hes a noob!"' else print "phew,not azerous.." end)
|
|
|
| Report Abuse |
|
|
Azureous
|
  |
| Joined: 29 Jan 2012 |
| Total Posts: 25287 |
|
|
| 17 Jan 2014 07:40 PM |
| @Eternal stop please, you're making yourself feel stupid, my only error was 1 end needed to be added ad I typed that in thirty seconds to prove your stupidity. |
|
|
| Report Abuse |
|
|
|
| 17 Jan 2014 07:40 PM |
@TheAwesomenessDude
You can make your own events. Look in the object browser for BindableEvent and RemoteEvent. |
|
|
| Report Abuse |
|
|
|
| 17 Jan 2014 07:40 PM |
why does nobody read my posts? I posted something that should fix it(look up,and stop ur flame war for a sec) |
|
|
| Report Abuse |
|
|
Azureous
|
  |
| Joined: 29 Jan 2012 |
| Total Posts: 25287 |
|
|
| 17 Jan 2014 07:40 PM |
oops should be:
idiot.Chatted:connect(function(msg)
--sorry :P |
|
|
| Report Abuse |
|
|
|
| 17 Jan 2014 07:41 PM |
If only you could hear yourself.
~ℇℸℇℛηαℒℱίℛℇℇαℸℇℛ~ |
|
|
| Report Abuse |
|
|
Azureous
|
  |
| Joined: 29 Jan 2012 |
| Total Posts: 25287 |
|
|
| 17 Jan 2014 07:42 PM |
| @Eternal, you're obviously not new here, but I've helped far more people than you have, so you should um seriously stop insulting your superiors. |
|
|
| Report Abuse |
|
|
lolb3
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 2268 |
|
|
| 17 Jan 2014 07:42 PM |
| Eternal, he's right. Stop ridiculing our attemps to help. You have no idea what you're talking about, so stop reposting. I propose a boycott on eternal's attempt to sound smart, and to not help help him until he improves his attitude towards people who !were! willing to help him. |
|
|
| Report Abuse |
|
|
|
| 17 Jan 2014 07:43 PM |
| I know for a fact that this is possible. I have seen it at SB, too. Sadly, I can't script this well yet. |
|
|
| Report Abuse |
|
|
|
| 17 Jan 2014 07:43 PM |
"Superiors" I laughed out loud at that remark. Armadillos will be the primary race before you are my superior.
~ℇℸℇℛηαℒℱίℛℇℇαℸℇℛ~ |
|
|
| Report Abuse |
|
|
Azureous
|
  |
| Joined: 29 Jan 2012 |
| Total Posts: 25287 |
|
|
| 17 Jan 2014 07:43 PM |
Btw eternal, sorry for being mean to you, I just got on roblox after a weeks break so my Lua is really sloppy anyway.
<_< |
|
|
| Report Abuse |
|
|