I have a bunch of item givers, that give custom made guns, but they can hurt players, so I decided to make a safe zone, like in most pvp games. So I decided to look up a safe zone model, It would work.. but it wasn't for FE, so it wouldn't work. Next, I've tryed to look on every video online that was related to "Safe Zone". Trying all of the scripts, no, they wont work.
Next, instead of using a ForceField, i tried to set the humanoid health to an very high number, then back to 100 health when they left.
local part = script.Parent part.Touched:connect(function(Player) local Players = game:GetService("Players") local ChangeHealth Player.CharacterAdded:Connect(function(Character) if ChangeHealth ~= nil then ChangeHealth:Disconnect() end local Humanoid = Character:WaitForChild("Humanoid") local MaxHealth = 2147483647 Humanoid.MaxHealth = MaxHealth ChangeHealth = Humanoid.HealthChanged:Connect(function() Humanoid.Health = MaxHealth print(Humanoid.Health) end) end) end)
I wanted to print the humanoid's health, and trying that, it gave me "100" Maybe we could fix this code, Or try another code? I dont know, I worked on this for 6 hours, Still no solution.. If you want to be specfic on the solutions i tryed, I tryed: FF script Another FF script A FF script that for some reason refreshes every 500 ms... And the health script I said. I just made my first post btw.