Jump to content

Recommended Posts

I want to make a character who will be not allowed to ride any rideable things.
So, I made a function in my prefab file:

local function NoMount(inst, target)
        if target and target.components.rideable then
            inst:PushEvent("refusedmount", {rider=inst,rideable=target})
            target:PushEvent("refusedrider", {rider=inst,rideable=target})
        end
end
But nothing works. What is wrong?

Edited by Glaudeo

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...