#how to make a custom forcefield spawn?

9 messages · Page 1 of 1 (latest)

random dome
#

i hope someone can provide me enough guide on how to do it ! new to scripting

ember maple
#
local Players = game:GetService("Players")

local FORCE_FIELD_DURATION = 15

local function giveForcefield(player, duration)
    local character = player.Character
    if character then
        local forceField = Instance.new("ForceField")
        forceField.Visible = true
        forceField.Parent = character
        if duration then
            task.delay(duration, function()
                if forceField then
                    forceField:Destroy()
                end
            end)
        end
    end
end
#

that is for all players, if you want it for an specific one you will have to tweak it according to your use case

random dome
#

where do u add ur forcefield

#

that u made?

ember maple
#

its in the script. it automatically appends it to the player

ember maple
#

sss?