Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why does this appear in my Output box?

I have made a few scripts but whenever I test it, in my output it says

14:30:45.738 - "Humanoid.torso" should be "Torso" in Script

So I used the "Find All" in the script menu to search for Humanoid.torso, and none showed up.

What is happening?

The scripts

--[[			LIST OF EVENTS:

1. Death
2. Instant death(Weapons kill instantly)
3. Sword
4. Speed
5. Zombies
6. Fire
7. Explode
8. Slowness
9. Sparkles
10. ForceField
11. Temporary ForceField
12. 50 Health Boost
13. Sit
14. Look Like Shedletsky
15. No Walkspeed

Add more later

	
	
																									]]
function OnTouch(part)
local h = part.Parent:FindFirstChild("Humanoid")
if 	h ~= nil then
	script.Parent:remove()
	local cray = math.random(1,11)
	local torso = h.Parent.Torso
	local sword = game:GetService("InsertService"):LoadAsset(47433):GetChildren()[1]
	sword.Parent = part.Parent
	local zombie = game:GetService("InsertService"):LoadAsset(187023590):GetChildren()[1]
	zombie.Parent = workspace
	zombie.Torso.Position = Vector3.new(torso.Position.x,h.torso.Position.y+100,torso.Position.z)
	local debris = game:GetService("Debris")
	if cray == 1 then	--Death
	h.Health = 0
	end
	
	if cray == 2 then	--Instant Death
	h.MaxHealth = 0.001
	end
	
	if cray == 3 then	--Sword
	debris:AddItem(sword,40)
	end
	
	if cray == 4 then --Speed
	h.WalkSpeed = 60
	end
	
	if cray == 5 then --Zombie
	debris:AddItem(zombie,40)
	end
	
	if cray == 6 then --Fire
	local f = Instance.new("Fire", torso)
	torso.BrickColor = BrickColor.new("Black")
	h.WalkSpeed = 30
	wait(.5)
	torso.Transparency = 0.1
	wait(.5)
	torso.Transparency = 0.2
	wait(.5)
	torso.Transparency = 0.3
	wait(.5)
	torso.Transparency = 0.4
	wait(.5)
	torso.Transparency = 0.5
	wait(.5)
	torso.Transparency = 0.6
	wait(.5)
	torso.Transparency = 0.7
	wait(.5)
	torso.Transparency = 0.8
	wait(.5)
	torso.Transparency = 0.9
	wait(.5)
	torso:remove()
	end
	
	if cray == 7 then --Explode
	local ex = Instance.new("Explosion")
	ex.Position = torso.Position
	end
	
	if cray == 8 then --Slowness
	h.WalkSpeed = 5
	end
	
	if cray == 9 then --Sparkles
	local s = Instance.new("Sparkles", torso)
	s.SparkleColor = Color3.new(255,255,255)
	end
	
	if cray == 10 then --ForceField
	local ff = Instance.new("ForceField", h.Parent)	
	end
	
	if cray == 11 then --Temporary ForceField
	local ff = Instance.new("ForceField", h.Parent)	
	wait(10)
	ff:remove()
	end
	
	if cray == 12 then --50 health boost
	h.MaxHealth = h.MaxHealth+50
	h.Health = h.Health+50
	end
	
	if cray == 13 then --Sit
	h.Sit = true
	end
	
	if cray == 14 then --Shedletsky
	game.Players:FindFirstChild(h.Parent.Name).CharacterAppearence = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId=261&placeId=0"
	h.Health = 0
	end
	
	if cray == 15 then --No Walkspeed
	h.WalkSpeed = 0
	end
	end
	end
script.Parent.Touched:connect(OnTouch)

"Humanoid.torso" doesn't exist in any of the scripts. Press Ctrl+F and type "Humanoid.torso". You won't find it in the scripts.

18 comments

0

Uhh..Inside the script, just remove where it says "Humanoid.torso", and replace it with "Torso". I'm not exactly too sure what ur looking for, but if I'm right, then that should work.

0

The problem is that there is no "Humanoid.torso". I didn't even put it in my script.

0

Oh. Ok, Uh...I have no idea what's wrong then...sorry. Could you maybe upload the script so I can see that?

0

I have an Idea, maybe it's a script in the player...

0

Nvm...

2

Post the script maybe?

1

Post the script...

0

It isn't in a script. I can post all the scripts with the word humanoid, you still couldn't be able to find it.

0

The output specifies which script the error occurred in; post that script here.

0

I did. I posted all the scripts that had the word Humanoid in it.

0

What line does it say the error is on?

0

It didn't say any line on any script. 14:30:45.738 - "Humanoid.torso" should be "Torso" in Script

1

It will say the error in red, then under that it will say which script it was and the line number in blue. "Script 'Workspace.Script', Line 1", for example, appeared in blue under a red error in one of my scripts.

0

Oh, most of the scripts are plug-ins.

0

Still does the same thing with plugins. I get this from a plugin I have, in blue after a red error: "- Script 'Plugin_143613186.PluginScript', Line 20"

0

I'm not talking about the plug in, i'm talking about the script with the "cray" in it.

0

Why are you being difficult on purpose? Well you have an answer now anyways. In the future, POST THE DARN LINE NUMBER.

0

Perci1, the problem is, I DON'T KNOW WHERE THE ERROR IS.

2 answers

Here you wrote h.torso where h = Humanoid. So this is the Humanoid.torso error.

Vector3.new(torso.Position.x,h.Torso.Position.y+100,torso.Position.z)

On different note. Why are you referencing the Torso in two different ways?

1 comment

0

Wait, wait, wait, I put "h.Parent.Torso", and "torso" = Humanoid.Parent.Torso

You wrote like this:

t-orso But it should be: T-orso

1 comment

0

I did use "T-orso".

This discussion is preserved as it was. New answers, comments, and votes are closed.