|
| 27 Aug 2015 01:47 AM |
Please help this script, it is supposed to locate the character and print their name( and no, i do not want their name, I want their character model in Workspace) local UserInputService = game:GetService("UserInputService") local plr = script.Parent.Parent.Name local char = game.Workspace.ChildAdded UserInputService.InputBegan:connect(function(v,b) if v.KeyCode == Enum.KeyCode.Space then
wait() print(char)
char.HumanoidRootPart.Size = char.HumanoidRootPart.Size - char.HumanoidRootPart.Size end end OUTPUT------------------------------------------------------------------------------------------ Signal ChildAdded 23:44:03.526 - HumanoidRootPart is not a valid member 23:44:03.526 - Script 'Players.Player.PlayerGui.LocalScript', Line 10 23:44:03.527 - Stack End |
|
|
| Report Abuse |
|
|
gooey333
|
  |
| Joined: 24 Mar 2013 |
| Total Posts: 1208 |
|
|
| 27 Aug 2015 01:51 AM |
ChildAdded is an event not an object.
try 'local char = game.Workspace:FindFirstChild(plr)' |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2015 01:53 AM |
no, that didn`t work but thanks here is the output:
nil 23:52:23.059 - Players.Player.PlayerGui.LocalScript:10: attempt to index upvalue 'char' (a nil value) 23:52:23.059 - Stack Begin 23:52:23.060 - Script 'Players.Player.PlayerGui.LocalScript', Line 10 23:52:23.060 - Stack End |
|
|
| Report Abuse |
|
|
gooey333
|
  |
| Joined: 24 Mar 2013 |
| Total Posts: 1208 |
|
|
| 27 Aug 2015 01:58 AM |
Perhaps the script is running before the character loads
under the local plr = ... line put plr.CharacterAdded:wait() |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2015 02:01 AM |
| thats what I though to! but that is not the case, now the output shows nothing when I press space. |
|
|
| Report Abuse |
|
|
AkaLua
|
  |
| Joined: 27 Jul 2012 |
| Total Posts: 526 |
|
|
| 27 Aug 2015 02:07 AM |
local uis = game:GetService("UserInputService") local plr = game.Players.LocalPlayer uis.InputBegan:connect(function(v,b) if b == false and v.KeyCode == Enum.Keycode.Space then local char = plr.Character if char then print(char.Name end end end)
|
|
|
| Report Abuse |
|
|
|
| 27 Aug 2015 02:10 AM |
akalua that didn`t work, the output: 00:09:23.020 - Keycode is not a valid EnumItem 00:09:23.020 - Script 'Players.Player.PlayerGui.LocalScript', Line 4 00:09:23.022 - Stack End |
|
|
| Report Abuse |
|
|
gooey333
|
  |
| Joined: 24 Mar 2013 |
| Total Posts: 1208 |
|
| |
|
|
| 27 Aug 2015 02:13 AM |
wAIT, i edited akaluas script and got this (which works) local UserInputService = game:GetService("UserInputService") local plr = game.Players.LocalPlayer UserInputService.InputBegan:connect(function(v,b) if v.KeyCode == Enum.KeyCode.Space then local char = plr.Character if char then print(char.Name) end end end) |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2015 02:17 AM |
| This script is SUPPOSED to split the rootpart in half, but right now it makes it as small as possible (0.1) |
|
|
| Report Abuse |
|
|
gooey333
|
  |
| Joined: 24 Mar 2013 |
| Total Posts: 1208 |
|
|
| 27 Aug 2015 02:20 AM |
| If you split the rootpart in half the player will instantly die |
|
|
| Report Abuse |
|
|
gooey333
|
  |
| Joined: 24 Mar 2013 |
| Total Posts: 1208 |
|
|
| 27 Aug 2015 02:21 AM |
And why it makes it as small as possible is obvious! You just said
RootSize = RootSize - RootSize
Thats like
n = 10 - 10 (0)
Roblox takes 0 and makes it minimum .1 |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2015 02:22 AM |
no I mean clone the other half root part( like in cube eat cube)
|
|
|
| Report Abuse |
|
|
gooey333
|
  |
| Joined: 24 Mar 2013 |
| Total Posts: 1208 |
|
|
| 27 Aug 2015 02:23 AM |
| That doesn't make it any different |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2015 02:24 AM |
| well can you please give me a script that WILL work? |
|
|
| Report Abuse |
|
|
gooey333
|
  |
| Joined: 24 Mar 2013 |
| Total Posts: 1208 |
|
|
| 27 Aug 2015 02:26 AM |
| No, because I don't get what you're doing! Tell me! |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2015 02:28 AM |
have you ever pressed space in cube eat cube? https://www.youtube.com/watch?v=MQATJU1yNP0 first 10 secs. |
|
|
| Report Abuse |
|
|
gooey333
|
  |
| Joined: 24 Mar 2013 |
| Total Posts: 1208 |
|
|
| 27 Aug 2015 02:30 AM |
| Never played it but your script has nothing to do with that in any way. |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2015 02:31 AM |
| it has press space, and it changes the size |
|
|
| Report Abuse |
|
|
gooey333
|
  |
| Joined: 24 Mar 2013 |
| Total Posts: 1208 |
|
|
| 27 Aug 2015 02:31 AM |
| Yah, lemme play it real kwik |
|
|
| Report Abuse |
|
|
| |
|
gooey333
|
  |
| Joined: 24 Mar 2013 |
| Total Posts: 1208 |
|
|
| 27 Aug 2015 02:35 AM |
| That is a 2D Gui, not the humanoid root part! It is all 2D |
|
|
| Report Abuse |
|
|
|
| 27 Aug 2015 02:36 AM |
| I know because, when I reset in that, it doesnt do anything |
|
|
| Report Abuse |
|
|
gooey333
|
  |
| Joined: 24 Mar 2013 |
| Total Posts: 1208 |
|
| |
|
|
| 27 Aug 2015 02:38 AM |
| the way that im doing it, how would I split it? |
|
|
| Report Abuse |
|
|