-
What do you want to achieve? I would like to make sure that when both players touch their parts then the door opens only for those two players
-
What is the issue? I created a remote function to open the door as I was advised to do, the script works except that the door opens for all players in the game
-
What solutions have you tried so far? I tried to modify the scripts, I tried to put the remote function script locally, I tried different things without success. (I am still a beginner)
--ServerScriptService
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local opendoor = ReplicatedStorage:WaitForChild("opendoor")
opendoor.OnServerInvoke = function(player)
game.Workspace.Door2.Transparency = 1
end
The second script is cut to match just the door opening action, I can send the whole script if needed
--LocalScript in StarterCharacter
local transparent = function()
if debounce == 1 then
debounce = 2
opendoor:InvokeServer(game.Workspace.Door2)
end
if not debounce == 1 then end
end;

Thanks !!