I made a local script of a chase sequence, there are many variables and touch functions to it; the touch functions are killing scripts and everything was working out fine except for one part that’s suppose to kill you when touched.
The parts are clones from workspace and are parented to CurrentCamera.
local Kit = workspace.Areas.Area1.ObbyStages.BallRollStage:Clone()
local BallRoll = Kit.RollingGolfBall
local humanoid = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
Kit.Parent = workspace.CurrentCamera
BallRoll.Touched:Connect(function(h)
if h.Parent:FindFirstChild('Humanoid') then
h.Parent:FindFirstChild('Humanoid'):TakeDamage(100)
end
end)
humanoid.Died:Connect(function()
wait(.5)
BallRoll:Destroy()
end)
Since this is a local script, the script resets on spawn
Is there really something wrong here or am I just dumb as heck?
The part is cloned
I want it to apply to the cloned part, plus, this script is on the client’s side, therefore when I use a regular script, other players will also die when touched even though they haven’t activated the cutscene