Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Anyone want to help me on fixing this script? [NOT SOLVED]

Basically, it's a first-person death script. Whenever you die, your view is wherever your head is looking. However, it doesn't work. How can I fix this?

if( CLIENT ) then
  
     local function CalcView( pl, origin, angles, fov )
   

       local ragdoll = pl:GetRagdollEntity();
       if( !ragdoll || ragdoll == NULL || !ragdoll:IsValid() ) then return; end
       

        local eyes = ragdoll:GetAttachment( ragdoll:LookupAttachment( "eyes" ) );
        

         local view = {
             origin = eyes.Pos,
             angles = eyes.Ang,
			 fov = 90, 
         };
        

         return view;
     
      end
      hook.Add( "CalcView", "DeathView", CalcView );
      

    
  end 

1 answer

Errr, this script is a mish mash of Java and Lua. Of course it's not going to work.

2 comments

0

Oh... :P

0

maybe you SHOULDN'T post java in this website. Close this topic, I doubt many people here know how to code in java. Come back when you've converted it to LUA.

This discussion is preserved as it was. New answers, comments, and votes are closed.