Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I've been trying to make a rasengan tool?

Asked by 10 years ago

but ROBLOX is saying "Touched" isn't a valid member of the tool. How do I fix this?


rasengan = game.StarterPack.Rasengan

local function onTouched(part) local h = part.Parent:Findfirstchild("Humanoid") h.Health:Takedamage(10) end script.Parent. Touched:connect(onTouched)

0
Are you sure the Script isn't the 'Handle'? If not, then that may be your problem. :) TheeDeathCaster 2368 — 10y

1 answer

Log in to vote
0
Answered by
Prioxis 673 Moderation Voter
10 years ago

The tool is not a Part so the Touched function will not work for it also please do the lua button and put your scripts in it so people can actually read your script its hard to read

also writing a onTouch script is way better if you write it this way

script.Parent.Touched:connect(function(hit)
local h = hit.Parent:FindFirstChild("Humanoid")
h.Health:TakeDamage(10)
end)

see this way you don't need to write that extra line at the very bottom

Ad

Answer this question