So this script is a script I made from scratch for a Boss' AI, everything works on the server side but on the client it's different, everything the boss does, for example when he regenerates his health, the change is being made on the server, but players cannot see it so therefore, he hasn't regenerated any lost health as far as the player is concerned. I want all Clients to see his actions.
-- Attack Script
hum = script.Parent.hum
actionEvent = Instance.new("RemoteEvent")
actionEvent.Parent = game.ReplicatedStorage
players = game.Players
actions = {"REST","REGEN","ROCKET"}
function regen()
local i=1
repeat
wait(0.2)
i=i+1
hum.Health=hum.Health+1
print(i)
until i==1/4*hum.MaxHealth
end
function rocket()
local projectile = Instance.new("Part")
projectile.Parent = workspace
projectile.Name = "projectile"
projectile.Material = "Neon"
projectile.Size = Vector3.new(1,1,2)
projectile.CFrame = script.Parent.Torso.CFrame*CFrame.new(0,0,-5)
local BV = Instance.new("BodyVelocity")
BV.Parent = projectile
BV.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
BV.Velocity = script.Parent.Torso.CFrame.LookVector*100
local Dmg = script.rocketDmg:Clone()
Dmg.Parent = projectile
Dmg.Disabled = false
end
while wait(5) do
actionEvent:FireAllClients()
action=actions[math.random(1,#actions)]
print(action)
if action=="REGEN" then
regen()
elseif action== "ROCKET" then
rocket()
end
end
I'm having a similar problem with the Damage Script for the Rocket. The Rocket is supposed to explode on Impact.
function Hit()
local ex = Instance.new("Explosion")
ex.Parent = script.Parent
ex.Position = script.Parent.Position
script.Parent:Destroy()
end
script.Parent.Touched:Connect(Hit)
wait(10)
script.Parent:Destroy()
Any help would be appreciated.

3 comments
i thought any changes made on the server would be automatically replicated to the client? no?
That's how it used to work, before they changed how the server communicates with the client.
I don't see why this change was made, I'll have to read up about that later on. Thanks for the info.