I'm just going to use a simple script my others are not working but I thought of using this
Script that creates the value
game.Players.PlayerAdded:connect(function(plr)
local leaderstats = Instance.new("IntValue")
leaderstats.Name = "leaderstats"
leaderstats.Parent = plr
local BD = Instance.new("IntValue")
BD.Parent = leaderstats
BD.Name = "Blocks Destroyed"
BD.Value = 0
end)
Script that Fires the Server This is a script located in game.Workspace as a part.
local hitpoints = 5
script.Parent.Touched:connect(function(hit)
local c = hit.Parent
print(c)
local check = game.Players:FindFirstChild(c.Name)
if check then
local h = c:FindFirstChild("Humanoid")
if h then
hitpoints = hitpoints - 1
h:TakeDamage(0.1)
local ex = Instance.new("Explosion",script.Parent)
ex.BlastPressure = 0
ex.BlastRadius = 0
ex.Position = script.Parent.Position
if hitpoints <= 0 then
script.Parent:Destroy()
local event = game.ReplicatedStorage.Events.Leaderboard.Blocks.Blocksd
event:FireServer()
end
end
elseif hit.Parent.Name == "Bullet" then
hitpoints = hitpoints - 1
if hitpoints <= 0 then
script.Parent:Destroy()
end
end
end)
This is the script that listens for it
script.Blocksd.OnServerEvent:connect(function(plr)
local v = plr:FindFirstChild("leaderstats"):FindFirstChild("Blocks Destroyed")
v.Value = v.Value + 1
end)
I received an error eventually saying FireServer can only be called from the client Help Please?

3 comments
Ok well I have another script that won't work and it is here ill paste it in pastebin
http://pastebin.com/pbctQrha
Scripts can call FireServer as well. Its an easy way to comunicate between 2 scripts.