• Halp! Stuck in a lua Error - Delayed Model changes
    3 replies, posted
Trying to make Model Switch after X Seconds Delay.. but i keep failing, Help please :( [CODE]function SWEP:SecondaryAttack() self.Weapon:EmitSound("nox/dragonroar.mp3",500) self.Weapon:SetNextSecondaryFire(CurTime() + 20) self.Owner:SetVelocity(self.Owner:GetForward() * 1000 + Vector(0,0,500)) self.Owner:SetVelocity(self.Owner:GetForward() * 1000 + Vector(0,0,500)) self.Owner:Ignite( 1, 100 ) self.Owner:SetModel("models/skyrim/dragon_paarthurnax.mdl") timer.Simple( 2, function() self:Human() self:Human2() end) end function SWEP:Human() print("Human Form") end function SWEP:Human1() Self.Owner:SetModel("Models/juggernaut_player.mdl") end [/CODE] - saw the typo in script of human 2 insted of 1.. dident fix the problem tho :/
You have "Self" instead of "self" in your Human1 function.
[QUOTE=Aaron113;35597847]You have "Self" instead of "self" in your Human1 function.[/QUOTE] I still get Timer Error: [gamemodes\lasertdm\entities\weapons\Weapon_Drakesword\shared.lua:118] attempt to index global 'Self' (a nil value)
[lua] self.Owner:SetModel("Models/juggernaut_player.mdl")[/lua] Like Aaron said you had "Self" instead of "self".
Sorry, you need to Log In to post a reply to this thread.