|
| 18 Aug 2016 01:07 AM |
local WorldService = game:GetService('Workspace') local PlayerService = game:GetService('Players')
function PerformLog(client,instance) print(instance.Value,'is the killer of',client.Name) local m = Instance.new("Hint",WorldService) m.Text = tostring(instance.Value.Name)..' is the killer of '..client.Name wait(3) m:Destroy() end
PlayerService.PlayerAdded:connect(function(client) client.CharacterAdded:connect(function(character) character:WaitForChild('Humanoid').ChildAdded:connect(function(instance) character.Humanoid.HealthChanged:connect(function() if instance.Name == "creator" and character.Humanoid.Health <= 0 then PerformLog(client,instance) end end) end) end) end)
It spams the message. |
|
|
| Report Abuse |
|
|
| |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 18 Aug 2016 01:48 PM |
'instance.Value.Name'
df is that
instance.Value *
|
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
| |
|
|
| 18 Aug 2016 07:45 PM |
| Look if you don't know how to help or read don't say anything. I name my service how I want and if you don't understand that instance is a returning variable from the event you obviously don't know how they work. |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 18 Aug 2016 07:48 PM |
https://forum.roblox.com/Forum/ShowPost.aspx?PostID=196472605
|
|
|
| Report Abuse |
|
|
|
| 18 Aug 2016 08:06 PM |
| workspace >> "world service" |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2016 08:07 PM |
| Thank you I appreciate it. |
|
|
| Report Abuse |
|
|
Skellobit
|
  |
| Joined: 13 Apr 2016 |
| Total Posts: 12758 |
|
|
| 18 Aug 2016 08:07 PM |
DayService = game:GetService("Lighting")
Formerly ToxicDominator - add 17,509 posts |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2016 08:07 PM |
| Why do people care what I call workspace... |
|
|
| Report Abuse |
|
|
Skellobit
|
  |
| Joined: 13 Apr 2016 |
| Total Posts: 12758 |
|
|
| 18 Aug 2016 08:08 PM |
well it's not like there's a built-in reference for it
Formerly ToxicDominator - add 17,509 posts |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2016 08:31 PM |
because you can literally just type
workspace
to get the workspace |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 18 Aug 2016 08:35 PM |
people who use GetService for EVERYTHING. kms
|
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 18 Aug 2016 09:36 PM |
"Look if you don't know how to help or read don't say anything. I name my service how I want and if you don't understand that instance is a returning variable from the event you obviously don't know how they work."
getService is only necessary for the services not default loaded into the game, such as the Teams service. |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2016 10:05 PM |
game:GetService'Workspace' gives you a constant reference to workspace, because if an exploiter changes the name of workspace to something different, game.workspace will error. so game:GetService'Workspace' would be the best thing to do
|
|
|
| Report Abuse |
|
|
|
| 18 Aug 2016 10:06 PM |
| @Time I have a habit of that, forgive me. Also you can literally just type workspace. [2] |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2016 10:07 PM |
| If a exploiter changes the name of workspace... this killed me... |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2016 10:07 PM |
I do it out of consistency.
local WorkspaceService = game:GetService("Workspace") local PlayersService = game:GetService("Players") local HTTPService = game:GetService("HttpService") etc |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2016 10:13 PM |
local workplace = game:GetService'Workspace'
game.Workspace.Name = 'not workspace'
print(workplace.Name)
print(game.Workspace.Name)
>'not workspace' >'not workspace' turns out game.Workspace references to workspace no matter the name anyways, oh well
|
|
|
| Report Abuse |
|
|
Skellobit
|
  |
| Joined: 13 Apr 2016 |
| Total Posts: 12758 |
|
|
| 18 Aug 2016 10:13 PM |
is the workspace keyword equivalent to game.Workspace or game:GetService("Workspace")
Formerly ToxicDominator - add 17,509 posts |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2016 10:14 PM |
workspace == game.Workspace == game:GetService'Workspace' they all function the same
|
|
|
| Report Abuse |
|
|
|
| 18 Aug 2016 10:14 PM |
| workspace is a variable defined by roblox to set to the workspace in all scripts |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2016 10:15 PM |
| Yep, its for lazy people like me. |
|
|
| Report Abuse |
|
|