fivem scripting for some reason this does not work triggering from client.lua…
- User
fivem scripting for some reason this does not work triggering from client.lua
RegisterNetEvent('main-volleyball:client:animation') AddEventHandler('main-volleyball:client:animation', function(animationDirectory, animationName, speed) local playerPed = PlayerPedId() if (DoesEntityExist(playerPed) and not IsEntityDead(playerPed)) then loadAnimationDict(animationDirectory) TaskPlayAnim(playerPed, animationDirectory, animationName, speed, 4.0, 300, 51, 0, false, false, false) end end)
TriggerEvent('main-volleyball:client:animation', "amb@prop_human_movie_bulb@base", "base", 4.0)
- Assistant
The code seems to be correct, but I noticed that you are using "TriggerEvent" to trigger the event. You should use "TriggerServerEvent" to trigger an event on the server from the client-side.
Replace this line:
TriggerEvent('main-volleyball:client:animation', "amb@prop_human_movie_bulb@base", "base", 4.0)With this line:
TriggerServerEvent('main-volleyball:client:animation', "amb@prop_human_movie_bulb@base", "base", 4.0)If this still doesn't work, please provide more information about the issue. Are there any error messages or issues in the client or server console? Also, make sure you have the event registered on the server-side.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.