LUA sctip help to put on server

ive found what looks like a fun LUA script id like to put in my server for me and my friends to mes with

its a parkour mod and has 3 LUA scripts

can anyone help/advise what i need to do to get it working on my server.

you need to contact the creator ask for the source code and convert to FX :wink: would love to see these features

awesome i see what i can find - this may be a dumb question but what does convert to FX mean exactly?

https://wiki.fivem.net/wiki/Developing check out the wiki it will tell u everything u need

yeah thanks beyond my ability yo comprehend right now, hopefully the creator responds these mods would be so much fun

no reply from the creator but i have the LUA files i gave it a go trying myself but no luck can anyone help me out?



local agu_parkour = {}





Citizen.CreateThread(function()
	while true do
		Wait(0)

	local player = PLAYER.PLAYER_ID()
	local playerPed = PLAYER.PLAYER_PED_ID()
	PLAYER._SET_MOVE_SPEED_MULTIPLIER(playerPed, 1.25);

	
	if(IsControlPressed(1, 102)then
		

		PLAYER.GIVE_PLAYER_RAGDOLL_CONTROL(player, TRUE);
		for i = 1, 10 do
			ENTITY.APPLY_FORCE_TO_ENTITY(playerPed, 1, 0,0,10.3, 0,0,0, false, false, false, false, false, false);
		end
		
		ENTITY.SET_ENTITY_INVINCIBLE(playerPed, true);
		PED.SET_PED_TO_RAGDOLL(playerPed, 6, 20, 20, TRUE, TRUE, TRUE);
		GAMEPLAY.SET_GRAVITY_LEVEL(2.5);
		
			
	else
		ENTITY.SET_ENTITY_INVINCIBLE(playerPed, false);
		
	end
	
	
end)





return agu_parkour

this is my edit of the 1st f 3 LUA files (looks like there is 3 scripts for each button press

the error i get is error parsing script agu_parkour in resource parkour: agu_parkour.lua :18 ) somewhere near then

This looks nice, i am going to take a look and maybe convert it

awesome can you let me know how it goes , this is my first look at LUA scripts so i have no idea where i am going wrong

ok i got a little closer i found the errors i had in the above - resource loads but i get this error

error resuming coroutine : agu_parkour.lua:13 attempt to index a nil value (global ‘PLAYER’)

what does this mean?

here is the converted code for that snippet you sent, it should work

Citizen.CreateThread(function()
    while true do
        Citizen.Wait(0)
        SetPedMoveRateOverride(PlayerPedId(), 1.25)
        if IsControlPressed(1, 102) then
            GivePlayerRagdollControl(PlayerId(), true)
            for i = 1, 10 do
                ApplyForceToEntity(PlayerPedId(), 1, 0, 0, 10.3, 0, 0, 0, false, false, false, false, false, false)
            end
            SetEntityInvincible(PlayerPedId(), true)
            SetPedToRagdoll(PlayerPedId(), 6, 20, 20, true, true, true)
            SetGravityLevel(2.5)    
        else
            SetEntityInvincible(PlayerPedId(), false)
        end
    end
end)

Please read and try and understand the code though

thank you this is really helpful i really appreciate do it

one question

where the orginal had PLAYER._SET_MOVE_SPEED_MULTIPLIER which i imagine is a game native?
and FX has SetPedMoveRateOverride where does it call/pick this up from is therre a reference of these i can get from somewhere?

https://runtime.fivem.net/doc/reference.html

brilliant thank you so much - just tested (before seeing your edit) had to close the function but it is working thank you again