ok so i have an apple(meshpart) in a folder in workspace and when i click on it, it is supposed to heal the player by 10 but it does absolutely nothing it doesn't even print
localscript:
script.Parent.ClickDetector.MouseClick:Connect(function()
print("clicked")
game.ReplicatedStorage.HealingEvents.SmallHeal:FireServer()
print("sent")
script.Parent:Destroy()
end)
script:
game.ReplicatedStorage.HealingEvents.SmallHeal.OnServerEvent:Connect(function()
game.Players.PlayerAdded:Connect(function(plr)
local hum = plr.Character.Humanoid
game.Workspace.Sounds.Crunch:Play()
hum.Health = hum.Health + 10
end)
end)
Exact Directory of the apple is game.workspace.PreAlphaApples.Apple but i dont think that matters

3 comments
you can use .MouseClick in a server script
no need for a local script or remote event
Yeah don't abuse FireServer.