Ok, so what I want to do is hit a stationary object, like a non-moving brick. I want to hit it with a tool that has a script in the Handle and has the same animation as a Linked Sword. Here's the script.
enabled = true
function onTouched(h)
if enabled == true then
if h.Name == "PUTIS" then -- The stationary object's name that the tool will hit
if h.Transparency ~= 1 then
enabled = false
h.Parent.Humanoid.Health = h.Parent.Humanoid.Health - 25 -- The stationary object has a humanoid. Whenever touched with the tool's handle, it will decrease by 25 health.
wait(1)
enabled = true
end
end
end
end
script.Parent.Touched:connect(onTouched)
There is no output error. For some reason, the script won't do anything when I'm (the player) is stationary and hitting the stationary object. This should work since the tool is moving, allowing the Touched script to activate, but it only works when the player himself/herself is moving. I'm looking for a fix to this problem or maybe an alternative solution that doesn't include a Touched script.

4 comments
For the Touched event to fire, the two Parts in question must be not intersecting and then come into contact - if they are already intersecting then it won't matter if you are moving the tool or not - that may be why moving the player helps.
So you're saying that the tool has have Cancollide = true?
No, sorry, but I don't think using the Touched event will work in your case. What you need to look into is using a loop ("while" or "RenderStepped") to manually check to see if the tool is touching a PUTIS.
How would that look in the script? I'm having trouble understanding what you're saying.