Help with a custom ULX Command

So I found an old ULX command that semi worked, but it had a few errors that needed to be fixed. I patched them to the best of my knowledge, (LUA noob), but there is one thing I don’t know how to do to fix it.

I want to make the train that spawns noclip so that it doesn’t get stuck inside the map and let players live. So after snooping around I found [http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index4e09.html]this page](http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index4e09.html) but the links are broken so I don’t know what the interger is :suicide:

This is obviously a joke command, but I would still like to get it working

Any help would be appreciated

EDIT: [I found this, but I’m not really sure what to do with it :\](http://gmodwiki.net/Lua/Classes/PhysObj/EnableCollisions)

Post the code for what you need help with. Would make it easier to help you because right now I have no idea what your trying to do.

From \garrysmod\addons\ulx\lua\ulx\modules\sh\fun.lua starting at line 384


------------------------------ Trainfuck semi working ------------------------------
function SpawnTrain( Pos, Direction )
	local train = ents.Create( "prop_physics" )
	train:SetModel("models/props_trainstation/train001.mdl")
	train:SetAngles( Direction:Angle() )
	train:SetPos( Pos )
	train:Spawn()
	train:Activate()
	train:EmitSound( "ambient/alarms/train_horn2.wav", 100, 100 )
	train:GetPhysicsObject():SetVelocity( Direction * 100000 )
	
	timer.Create( "TrainRemove_"..CurTime(), 5, 1, function() if not IsValid(train) then return end train:Remove() end)
end

function ulx.trainfuck( calling_ply, target_plys )
	for _, ply in ipairs( target_plys, calling_ply ) do
		
		local Hp = ply:Health()
		local Dif = Hp - 0
		local HpOut = Hp - Dif
		local HpSur = Hp + Dif
		
		ply:SetMoveType( MOVETYPE_WALK )
		ply:GodDisable()
		ply:SetHealth(HpOut)
		SpawnTrain( ply:GetPos() + ply:GetForward() * 750 + Vector(0,100,0), ply:GetForward() * -1 )
		ply:GodDisable()
		ply:SetMoveType( MOVETYPE_WALK )
		
		timer.Create( "trainKillNot_", 6.5, 1, function( target_plys )
			if ply:Alive() then ply:SetHealth(HpSur) else end
		end )
		
	end

	ulx.fancyLogAdmin( calling_ply, "#A trainfucked #T", target_plys )
end

local trainfuck = ulx.command( "Fun", "ulx trainfuck", ulx.trainfuck, "!trainfuck" )
trainfuck:addParam{ type=ULib.cmds.PlayersArg }
trainfuck:defaultAccess( ULib.ACCESS_ADMIN )
trainfuck:help( "Fuck a player with a train." )

Try adding train:SetCollisionGroup( COLLISION_GROUP_NONE ) to your spawn function. If you don’t like how that collision group works
then you can just replace it with one from: http://wiki.garrysmod.com/page/Enums/COLLISION