How to make a prop damageable by only one side

I’m making a game where there are two teams and you win by destroying the other team’s prop. How would I make it so only the opposing team can damage your prop to prevent trolls from destroying their own team’s prop. I already tried looking at other topics but they don’t really make sense or work for me.

Screenshots would be helpful.

2 Likes

Welcome!
Here’s what I would do:

Materials

  • 1x Lifecycle
  • 1x Relay
  • 1x Trigger
  • 2x Barrier

Steps

  1. Place down the two props:
    image
  2. Now place down a lifecycle with these settings:
    Lifecycle
    So now when the game starts, it will broadcast on a channel, gameStart. Lifecycles will only broadcast for the host so we add a relay:
  3. Place down a relay with the following settings:
    Relay
    Now it will broadcast on teamNumber for all players.
  4. Place a trigger now with the following settings:
    Trigger >>> Featured
    Trigger >>> All Options >>> Very Bottom
    Now this trigger will trigger on teamNumber.
  5. Going off to the side on the trigger, select “Blockcode”. Create a new block with these settings:
    Trigger >>> Blockcode >>> New Block when triggered.
    If the player is on team 1, it will broadcast on team1, if the player is on team 2, it will broadcast on team2.
  6. Cover team 1’s prop with a barrier like this:
    image
  7. Go into the settings of the barrier and change the following settings:
    Barrier >>> Availabiltiy
    Edit: Make the Active Scope = team
    Now, if they are on team 1, a barrier will appear over their prop so they can’t shoot it.
  8. Repeat Steps 6 - 7, except for Team 2. The barrier should activate on team2.

Is there an easier way to do this? Probably. However, if you practice with more complex stuff now, doing really hard things down the road will be easier.

3 Likes

Thanks!

Edit: The barrier works for blocking players, but it still doesn’t work for projectiles, is there a way to fix that?

Hmmm. That’s odd. I don’t know what’s happening…

1 Like

I think I fixed it? Haven’t tested it with more than 1 player but I changed the active scope of the barriers to global

Edit: This doesn’t work, I tested with my friend

make a berrier invisible on all but the side done

the barrier only exists for one team, but that team can still use projectiles to hit the prop through the barrier.

well then put collision yes

Screenshot 2024-10-11 10.34.31 AM
collision is enabled. it blocks movement but not projectiles

well it should one sec

1 Like

make sure prop has damege
works for me
Screen recording 2024-10-11 9.43.28 AM

1 Like

WEE WOO WEE WOO GRAMMAR POLICE
G.B.O.T, How do you do that? You’ve gotta explain it

1 Like

Do what?!?!

The activate scope needs to be team

yes, I set it to team and it still didn’t work?
image

or do you mean visibility scope of the prop?

Hold on. Go into the barrier that activates on team1.
Set active on game start to yes, get rid of activates on team1 and have it deactivate on team2
Go into the barrier that activates on team2.
Set active on game start to yes, get rid of activates on team2 and have it deactivate on team1

That’ll fix it. No clue why it doesn’t work the other way around…

um idk I think it still doesn’t work now lol

The barriers still work for blocking players

But now both barriers block projectiles for all teams, so you can’t hit the other teams’ prop
:confused:

I am rechecking settings

image


That’s the left barrier

That’s the right barrier

I’m team 1

image

Team 2 POV
image

hmm

I have the same settings.
image
Here’s what my team’s prop looks like (I’m team 1 here)

And here’s what the other team’s prop looks like
image

It looks right but it doesn’t function right