I'm planning on making a portal tool, that a player can spawn, and its visible to all players, including the client who spawned it, and after a certain amount of time, lets say.. 5 seconds or so, the portal vanishes for everyone, but if the client that has spawned it, or anyone else enters the portal, they'll vanish with the portal, but for the client, they can still see it from the inside if that makes sense, feel free to ask any questions if this isn't clear enough, any advice appreciated, thank you in advance.
whenever you do something in a local script, those changes only reflect for the player, not everyone else in the server.
there's some exceptions like with character physics (animations, character movement etc), that get replicated to the server no matter what, but everything else does not change the server.
if i was to make a part transparent in a local script, that change would only show for me, not anyone else in game.
I'm planning on making a portal tool, that a player can spawn, and its visible to all players, >including the client who spawned it
give the player a tool in a server script (normal script). everyone can see this.
after a certain amount of time, the portal vanishes for everyone aside from the client that has >spawned it
on the server, fire a remote event (called hidePortal) that will hide the portal for everyone else except the client who spawned it:
--server script --this script is inside the portal so it'll run when it's cloned hidePortal = game:GetService("ReplicatedStorage").hidePortal portal = script.Parent playersTouchingPortal = {} wait(5) --wait 5 seconds before making portal dissapear --to whatever you need to do here to determine if there in the portal. Maybe GetTouchingParts() if the portal is an area hidePortal:FireAllClients(playersTouchingPortal, portal) --local script: player = game.Players.LocalPlayer hidePortalEvent = game:GetService("ReplicatedStorage").hidePortal function HidePortal(playersInPortal, portal) --if were not in the portal make the portal invisible for us for _, portalPlayer in pairs(playersInPortal)do if(player ~= portalPlayer)then --make portal invisible for i, v in pairs(portal:GetDescendants())do if(v:IsA("BasePart"))then v.Visible = false v.CanCollide = false end end end end hidePortalEvent.OnClientInvoke = HidePortal
anyone who has enters the portal, they'll vanish with the portal, but for the client, they can >still see it from the inside if that makes sense
not sure what you mean by that ^^