function createForcefieldLocal(tribute)
	while _G.gamesOn == true do 
		wait(0.01)
		if (Vector3.new(tribute.Character.Torso.Position.X, 5, tribute.Character.Torso.Position.Z) - Vector3.new(0, 5, 0)).magnitude >= forcefieldSize then
			if tribute.Character.Torso:FindFirstChild("Hurt") == nil then
				if tribute:FindFirstChild("Tribute") then
					if tribute.Tribute.Value == true then
						tribute.Character.Humanoid.PlatformStand = true 
						b = Instance.new("BodyPosition", tribute.Character.Torso) 
						b.D = 100000 
						b.position = Vector3.new(0, tribute.Character.Torso.Position.Y - 20, 0) 
						b.P = 100000 
						b.maxForce = Vector3.new(25000, 10000, 25000)
						local scr1 = Game.Lighting.Hurt:clone()
						local scr2 = Game.Lighting.UnPlatformStand:clone()
						scr1.Parent = tribute.Character.Torso
						scr2.Parent = tribute.Character.Torso
					end
				end
			end
		end 
	end
end
for k, v in pairs(Game.Players:GetPlayers()) do
	coroutine.resume(coroutine.create(createForcefieldLocal), v)
end

Why wont that work? It's in a regular script. Assume that all the players have the 'Tribute' value as a child of them.

4 comments

1

Are you receiving any errors?

0

No... I would have put the output if i was..

0

It's terrible code in the first place, it really should be rewritten.

0

From what I see the code you have presented should work fine. It would have to be another part of your game that causes this to not work.