Im trying to make a FF script that will replace the default FF with a custom one but it comes up with an error in the output saying something like: FF is not a valid member of ServerStorage
here is the script:
local FF = require(game:GetService('ServerStorage').FF)
local ForceField = game:GetService('ServerStorage').FF:Clone()
game:GetService('Players').LocalPlayer.CharacterAdded:connect(function()
ForceField.Parent = game:GetService('Players').LocalPlayer.Character.Torso
game:GetService('Players').LocalPlayer.Character.Humanoid.MaxHealth = 0
wait(6)
ForceField:Destroy()
game:GetService('Players').LocalPlayer.Character.Humanoid.MaxHealth = 200
game:GetService('Players').LocalPlayer.Character.Humanoid.Health = 200
end)

3 comments
The problem could be that "FF" doesn't exist at the time the code executes; to work around this, I recommend using the "WaitForChild" function: it waits until a child w/ the same name as the argument is within the parent, then returns it. "Parent:WaitForChild('ChildName')"
i figured it out i had to put FF into replicated storage
Ah, ok. :P