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

Why is "Touched" not a valid member of local script and can i change this or fix it?

Im making a FireBall script for my game and i was just testing it and something is wrong with my fire damage script here:

script.Parent.Touched:connect(onDamage)

on this line on code it says touched is not a valid member of local script what can i use instead or at least fix it?? Here is the whole script:

function onDamage(Part)

if Part.Parent:FindFirstChild("Humanoid") ~= nil and Part.Parent.Name ~=

"script.Parent.Name" then

	script.Disabled = true

	for i = 1,25 do

		Part.Parent.Huamnoid.Health = Part.Parent.Humanoid.Health -1
		wait(0,05)
		end
	script.Parent:remove()

end
wait()

end script.Parent.Touched:connect(onDamage)

--

6 comments

0

Have you tried in a server script?

0

Also if you can provide your ENTIRE setup of the fireball, please do.

0

No I haven’t tried server script and I will put my entire set up of it in the morning I just gtg get some rest

0

Btw the fireball is working it’s jut that 1. It doesn’t damage people/things because of the touches script thing - and 2. I don’t know why but I’m the only one able to see the fireball

0

The reason it wont appear on other people screens is becuase its a localscript

0

Here is the entire script (sry i was ta school):

1 answer

On line 5: Part.Parent.Huamnoid.Health = Part.Parent.Humanoid.Health -1 - You spelled Humanoid wrong

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