UPDATE: I figured it out. LocalScripts can clone from storage but they aren't good at it. See my answer below.
I have a tool that shoots a fireball. When the tool is activated, it makes a clone of a fireball that's in the lighting (not sure if this is the best place to store this stuff?). It then shoots the fireball wherever the mouse is pointed.
However, when it comes into contact with any part, it's supposed to stop and detonate. I have a Touched event in a script inside the fireball that's supposed to connect whenever it touches a part. However, when in the server, the event simply never fires, and the fireball continues to pass through everything. Again, the touched event fires just fine in simulation testing, but is unresponsive in the server test.
This is the script that's the child of the fireball:
damage = {script.Parent.Damage.lvl1.Value, script.Parent.Damage.lvl2.Value, script.Parent.Damage.lvl3.Value, script.Parent.Damage.lvl4.Value, script.Parent.Damage.lvl5.Value}
baseDamage = script.Parent.Damage.lvl1
script.Parent.Touched:connect(function(part)
local owner = script.Parent.Owner.Value
local timer = script.Parent.Timer.Value
local humanoid = part.Parent:FindFirstChild("Humanoid")
local player = game.Players:FindFirstChild(owner)
if humanoid then
if part.Parent.Name ~= owner then
explosion(Instance.new("Explosion"), script.Parent.Position)
humanoid:TakeDamage(damage[player.Stats.Level.Value])
if humanoid.Health <= 0 then
local creator = Instance.new("StringValue")
creator.Parent = humanoid
creator.Value = owner
creator.Name = "Killer"
local deathby = Instance.new("StringValue")
deathby.Parent = humanoid
deathby.Value = script.Parent.Name
deathby.Name = "DeathBy"
end
script.Parent:Destroy()
end
else
if part.Name ~= "Handle" then
explosion(Instance.new("Explosion"), script.Parent.Position)
script.Parent:Destroy()
end
end
end)
function explosion(instance, location)
instance.Parent = game.Workspace
instance.Position = location
instance.BlastPressure = 0
instance.BlastRadius = 2
end
I've had this script working before, I'm just not sure what has caused the touched event to go unresponsive in the server.

1 comment
Unfortunately, no. The problem I'm having is the event isn't even firing. Even as the fireball goes through parts, the script.Parent.Touched event isn't being triggered. The code inside has worked for me, it's just not even reaching that whole block of code.