#idk why i have an error on this script

1 messages · Page 1 of 1 (latest)

gentle sandal
#

this is the script

local part = script.Parent
local DAMAGE_AMOUNT = 20

part.Touched:Connect(function(hit)
local character = hit.Parent
if character then
local humanoid = character:FindFirstChild("Humanoid")
if humanoid then
humanoid:TakeDamage(DAMAGE_AMOUNT)
end
end
end)

honest quail
#

You’re trying to call .Touched on a folder

gentle sandal
#

wut

#

idk nothing abt scripting

tawny dock
#

part is a folder

#

this isnt scripting

gentle sandal
#

oh

tawny dock
#

part is a folder

fickle niche
#

Folder

gentle sandal
#

i dont have any folders that are named part

frank lodgeBOT
#

studio** You are now Level 8! **studio

gentle sandal
#

those are the only ones i got look

tawny dock
#

brother

#

script.parent

#

is part

honest quail
#

The parent of the script is a folder

tawny dock
#

script.parent

#

is a folder

gentle sandal
tawny dock
#

open the folder with the script in

gentle sandal
#

done

honest quail
#

You’re supposed to parent the script to a part, right now you’re trying to call .Touched on script.Parent which is a folder

tawny dock
#

send a screenshot

gentle sandal
honest quail
#

Guh

tawny dock
#

what the fuck

gentle sandal
#

😭

#

what did I do wrong

honest quail
#

Just parent the script to the part you want to damage the player

#

Not the folder

gentle sandal
#

how do I do that

honest quail
#

Bruh

gentle sandal
#

oh add

honest quail
#

Parent property

gentle sandal
#

wdym bruh

fickle niche
gentle sandal
#

wtf

fickle niche
#

Funny

gentle sandal
tawny dock
gentle sandal
#

lmao im not calling u anything cxuz i would get banned

#

but if ur going to help like that then dont cuz idk nothing abt scripting

tawny dock
#

so

#

you scripted

#

without knowing scripting

#

🤦‍♂️

gentle sandal
#

do u know what AI is?

#

🤦‍♀️

tawny dock
#

so you arent helping yourself at all and ai scripts suck

fickle niche
gentle sandal
honest quail