UserInputService/LocalScript breaks after death

I have a tool that has a localscript that works fine in studio even after death but in game its fine too but breaks when i reset/die, with no errors or anything being deleted
heres the print in studio
image
and here in game (stops printing after i die)
image

the script:

local uis = game:GetService('UserInputService')
local remote = script.Parent:WaitForChild('Remote')
uis.InputBegan:Connect(function(input, active)
	if (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) and not active then
		print('FIRED BEGAN')
		remote:FireServer('down', getPlayerMouseLoc())
	end
end)


uis.InputEnded:Connect(function(input, active)
	if (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) and not active then
		print('FIRED ENDED')
		remote:FireServer('up', getPlayerMouseLoc())
	end
	if script.Parent.Parent:IsA('Model') and input.KeyCode == Enum.KeyCode.Q then
		if script.Parent.Spells:FindFirstChild('Protego') then
			remote:FireServer('Qpressed', getPlayerMouseLoc())
		end
	end
end)```

Where is the local script placed?

In the tool inside starterpack

why is everyone ignores tool.Activated?

tried that and still didnt work i also put the tool in another game and it works fine idk why it doesnt in the main game

maybe the humanoid rig is different

nvm turns out i was preloading an animation that belonged to me and not my group

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.