Behind Wall prompts

Hello, I want to make a wall that can block proximity prompts from being clicked by anyone. I mean, if I go close to the wall then I can click the proximity pompt and go in the car but I don’t want this to happen. I don’t know if it’s possible but I want a wall that can block proximity prompts so only the team that I have assigned can click them. If you don’t understand tell me so I can explain with photos etc.

4 Likes

Do you mean to make a team not be able to interact with a proximity prompt you want?

Server Script

local Prompt = script.Parent.ProximityPrompt
local Teams = game:GetService("Teams")
local Remote = game.ReplicatedStorage:FindFirstChild("RemoteEvent")
function Get(player)
	Remote:FireClient(player) -- EDIT: did a mistake here
	return player
end

Prompt.PromptButtonHoldBegan:Connect(Get)

Local Script inside of StarterPlayerScripts

local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local Teams = game:GetService("Teams")
local Remote = game.ReplicatedStorage:FindFirstChild("RemoteEvent")
local OurTeam = Teams.Police -- random team i made
local function TeamCheck()
	if Player.Team == OurTeam then
		game.Workspace:FindFirstChild("Part").ProximityPrompt.Enabled = false -- replace part
	end
end

Remote.OnClientEvent:Connect(TeamCheck)

No, I want to make a wall where when you see behind it for example move your camera in there you won’t be able to see the prox prompt.

If you want to do that simply check the RequiresLineOfSight property.

image_2024-03-02_182815544

image_2024-03-02_182845450

1 Like

Yes, but I want the wall to be invisible and they can just turn their camera there so they can join

It isn’t visible when you turn your camera.

Is it because of the max activation (It’s 10)? I don’t want to change this either.

Yes that’s my fault
You said you didn’t want a specific team to not be able to interact with the prompt.
You can use PromptShown too and you don’t even need a wall so I am confused.

wait()
local OurTeam = Teams.Police
local Prompt = game.Workspace:FindFirstChild("Part").ProximityPrompt
local function TeamCheck()
	if Player.Team == OurTeam then
		game.Workspace:FindFirstChild("Part").ProximityPrompt.Enabled = false
	end
end

Prompt.PromptShown:Connect(TeamCheck) --here

Inside a local script; half of it but this should give you the idea now?

Or you can use

game["Run Service"].RenderStepped:Connect(TeamCheck)

I want people only to go in the passenger seats so look at my screenshot and look and why when you turn the camera it doesnt appear?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.