Is there a way to "touch" all props in the server?

Using prop protection (any), after you load a save file all props are owned by N/A until you interact with them in some way. Basically, after I load a save, I want to own everything in that save without going around and phys gunning everything.

You could make a script that checks if its single player and then on initial spawn set all currently spawned props to you. This is a rough example so things might not work:

[lua]
– InitSpawn:
– Description: Sets player to own all dem props in the map on spawn

function InitSpawn(ply)

–Check if not singleplayer
if !game.SinglePlayer() then return end

–Get all ents in map
local ents = ents.GetAll()

–Cycle through all of the ents
for k,v in pairs(ents) do
if v:IsValid() and /throw extra check here if you need it/ then
ent:SetOwner(ply)
end
end
end
hook.Add(“PlayerInitialSpawn”, “own_dem_props”, InitSpawn ) --attach function to the PlayerInitialSpawn hook so it runs when player first joins
[/lua]

I need to do this in an online, local server. Can I just remove that if?

Yea you can, but in that case I need to change it around a tad bit, because I thought you were only doing this in single player. Are you trying to only set all props that do not have a owner ONLY to you or to anyone who first joins?

I am making an obstacle course which requires a very specific method of ownership. Basically, I need to start a server, load a save, and then own all the props it loads.

Here I did both ways:

[lua]
– InitSpawn:
– Description: Sets player to own all dem props in the map on spawn

function InitSpawn(ply)

CODE FOR ONLY YOU
–See if player joining is you if not then cancel out of code
if ply:SteamID() != “Put steamID here” then return end

CODE FOR FIRST PERSON
– Uncomment the lines below to use this code–
–ONLY!!! do it for the first player joining; I think 2 is the first player instead of 1
–if ply:UserID() != 2 then return end

–Get all ents in map
local ents = ents.GetAll()

–Cycle through all of the ents
for k,v in pairs(ents) do
if v:IsValid() and v:GetOwner() == nil then
ent:SetOwner(ply)
end
end
end
hook.Add(“PlayerInitialSpawn”, “own_dem_props”, InitSpawn ) --attach function to the PlayerInitialSpawn hook so it runs when player first joins
[/lua]

ents.GetAll() will return all entities though, not just props

Which is why I told him earlier in the other code to put another check in the if statement.