Script inside server script service:
local Safe = game.Teams.Safe local player = game.Players.LocalPlayer local ForceField = Instance.new("ForceField") if player.Team == Safe then ForceField.Name = "NewForceField" ForceField.Parent = player.Character end
You cannot access the LocalPlayer from the server, only on the client. Instead you would need to do something like this...
local Safe = game.Teams.Safe game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) if player.Team == Safe then local forcefield = Instance.new("ForceField") forcefield.Name = "NewForceField" forcefield.Parent = character end end) end
Alternatively this may not work due to the team being assigned when the character already exists, so you could also do something like this...
local Safe = game.Teams.Safe game.Players.PlayerAdded:Connect(function(player) -- listen to when the player's team is changed player:GetPropertyChangedSignal("Team"):Connect(function() if player.Team == Safe then if player.Character then local forcefield = Instance.new("ForceField") forcefield.Name = "NewForceField" forcefield.Parent = player.Character end end end) end