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
Have you tried in a server script?
Also if you can provide your ENTIRE setup of the fireball, please do.
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
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
The reason it wont appear on other people screens is becuase its a localscript
Here is the entire script (sry i was ta school):