I try to make a door that closes another door but I need a client sided script for that, maybe someone can help me with this?
I would recommend something like this, k?
MAKE SURE THIS SCRIPT IS NOT IN THE WORKSPACE, somewhere like startergui works fine.
local door1 = 0 -- Replace 0 with the location of your door local door2 = 0 -- Replace 0 with the location of your door door1.Touched:Connect(function() door2.CanCollide = true door2.Transparency = 0 end)
Well, this question truly depends on which script you enter this in.
For example, if ****code**** is inserted in a 'normal' script (server), each and every player would notice this change and this would be called: "Server Side".
But, if you were to insert ****code**** in a local script (client), only the player 'owning' this script gets to see the change, this would be called "Client Side".
****CODE:****
local door_part = nil -- Part of the door to control. if door_part then door_part.Touched:Connect(function(hit) -- if there is a door in the script and this door part is touched then: if game:GetService("Players"):GetPlayerFromCharacter(hit.Parent) then -- is a PLAYER touching the door's part? then: door_part.Transparency = 1; door_part.CanCollide = false -- Then, set the transparency to 1 and make the door not cancollidable. end end)end