amazingGob Posted September 8, 2025 Share Posted September 8, 2025 or maybe to check if you have a follower? whichever is easier, i just want a simple sanity boost if you are near friendly mobs Link to comment https://forums.kleientertainment.com/forums/topic/167893-code-to-check-if-a-mob-pigmanmermspider-is-friendly-to-you/ Share on other sites More sharing options...
FerniFrenito Posted September 9, 2025 Share Posted September 9, 2025 To get the followers player_inst.components.leader:CountFollowers() To check if mob is hostile to the player: if player_inst.HostileTest ~= nil then return player_inst:HostileTest(mob_inst) elseif mob_inst.HostileToPlayerTest ~= nil then return mob_inst:HostileToPlayerTest(player_inst) else return mob_inst:HasTag("hostile") end --[[ Return: True: The mob is hostile False: The mob doesn't attack the player --]] 1 Link to comment https://forums.kleientertainment.com/forums/topic/167893-code-to-check-if-a-mob-pigmanmermspider-is-friendly-to-you/#findComment-1834937 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now