it would be easy if the touched script was a local script but it wont work as local...
game:GetService("UserInputService").InputBegan:connect(function(key)
snake = game.ReplicatedStorage.snake
clone = snake:Clone()
plr = game.Players.LocalPlayer
if key.KeyCode == Enum.KeyCode.R then
if enable == true then return end
enable = true
ani = Instance.new("Animation")
ani.AnimationId = "rbxassetid://698146588"
load = plr.Character.Humanoid:LoadAnimation(ani)
clone.Parent = game.Workspace
clone.CFrame = plr.Character.Torso.CFrame * CFrame.new(0,0,-20)
load:Play()
v = Instance.new("BodyVelocity", clone)
v.velocity = plr.Character.Torso.CFrame.lookVector * 60
v.maxForce = Vector3.new(math.huge, math.huge, math.huge)
clone2 = script["Script"]:Clone()
clone2.Disabled = false
clone2.Parent = clone
wait(3)
enable = false
end
end)
--the touch script(normal script):
test = true
script.Parent.Touched:connect(function(plr)
if plr.Parent:FindFirstChild("Humanoid") ~= nil then
if test == true then
test = false
plr.Parent.Humanoid.Health = plr.Parent.Humanoid.Health - 20
wait(2)
test = true
end
end
end)
wait(5)
script.Parent:Remove()

2 comments
edit to fix the formatting
please use the lua button makes things easier to read