For some reason, my local script won't fire the remote event I created after death. Both scripts are in a tool called "Lightning Drop" in the starter pack, it's a script that makes the player teleport to the ground and creates a sort of a yellow cylinder, after death my player still teleports to the ground and plays the animation but the hitbox, sounds and the yellow cylinder doesn't show up, probably because the event doesn't fire but I am not sure.
The local script:
local ReplicatedStorage = game:GetService("ReplicatedStorage") local ThunderEvent = ReplicatedStorage:WaitForChild("ThunderEvent") local ThunderEvent = ReplicatedStorage:FindFirstChild("ThunderEvent") local player = game:GetService("Players").LocalPlayer local playername = player.Name local character = player.Character or player.CharacterAdded:Wait() while not character or not character.Parent do character = player.Character wait() end local humanoid = character:FindFirstChildOfClass("Humanoid") local humanoid = character:WaitForChild("Humanoid") print("bruh") local animation = Instance.new("Animation",humanoid) animation.AnimationId = "rbxassetid://4404554219" local dropanimation = humanoid:LoadAnimation(animation) local mouse = player:GetMouse() local humanoid = character:FindFirstChildOfClass("Humanoid") local humanoid = character:WaitForChild("Humanoid") local animation = Instance.new("Animation",humanoid) animation.AnimationId = "rbxassetid://4404554219" local dropanimation = humanoid:LoadAnimation(animation) local function lightning() local ray = Ray.new(character.UpperTorso.Position,character.UpperTorso.Position - Vector3.new(0,100000000,0)) local ignore = character local part = workspace:FindPartOnRay(ray,ignore) print("bruh") if part then local partheight = part.Position.Y + part.Size.Y if character.UpperTorso.Position.Y - partheight> 20 then print("bruh 2") character:MoveTo(Vector3.new(character.UpperTorso.Position.X,part.Position.Y,character.UpperTorso.Position.Z)) ThunderEvent:FireServer(player.character.UpperTorso.Position) dropanimation:Play() wait(0.5) dropanimation:Stop() end end end script.Parent.Activated:Connect(lightning)
The script:
local ReplicatedStorage = game:GetService("ReplicatedStorage") local ThunderEvent = ReplicatedStorage:WaitForChild("ThunderEvent") local ThunderEvent = ReplicatedStorage:FindFirstChild("ThunderEvent") local player = game:GetService("Players").LocalPlayer local playername = player.Name local character = player.Character or player.CharacterAdded:Wait() while not character or not character.Parent do character = player.Character wait() end local humanoid = character:FindFirstChildOfClass("Humanoid") local humanoid = character:WaitForChild("Humanoid") print("bruh") local animation = Instance.new("Animation",humanoid) animation.AnimationId = "rbxassetid://4404554219" local dropanimation = humanoid:LoadAnimation(animation) local mouse = player:GetMouse() local humanoid = character:FindFirstChildOfClass("Humanoid") local humanoid = character:WaitForChild("Humanoid") local animation = Instance.new("Animation",humanoid) animation.AnimationId = "rbxassetid://4404554219" local dropanimation = humanoid:LoadAnimation(animation) local function lightning() local ray = Ray.new(character.UpperTorso.Position,character.UpperTorso.Position - Vector3.new(0,100000000,0)) local ignore = character local part = workspace:FindPartOnRay(ray,ignore) print("bruh") if part then local partheight = part.Position.Y + part.Size.Y if character.UpperTorso.Position.Y - partheight> 20 then print("bruh 2") character:MoveTo(Vector3.new(character.UpperTorso.Position.X,part.Position.Y,character.UpperTorso.Position.Z)) ThunderEvent:FireServer(player.character.UpperTorso.Position) dropanimation:Play() wait(0.5) dropanimation:Stop() end end end script.Parent.Activated:Connect(lightning)