I’m trying to make a script where when a proximity prompt is triggered, a wall disappears. How would I make that?
If you done a simple research you would know, that is possible by proximity prompt .Triggered event, and you can hide the wall with either tweening the Trasnparency or destroying it.
local prompt = -- path to proximity prompt
local wall = -- path to the wall
prompt.Triggered:Connect(function(player)
wall:Destroy()
end)
The trouble I’m having here is with the client and server side. I forgot to mention, the wall should only disappear for the player that triggered it. For everyone else, it should stay there.
Fire a RemoteEvent to the Player and Destroy the Wall on Client.
Server:
local prompt = -- path to proximity prompt
local remote = -- path to the remote event
prompt.Triggered:Connect(function(player)
remote:FireClient(player)
end)
Client:
local remote = -- path to the remote event
local wall = -- path to the wall
remote.OnClientEvent:Connect(function()
wall:Destroy()
end)