Hi, I'm trying to create a script in Roblox Studio that if you put a script in a certain Part, that Part is only visible to the Owner but I don't know how, can someone help me?
COMMUNITY QUESTION
How do I make a Part only visible to the Owner/a certain player?
1 answer
if game.Players.LocalPlayer.Name == "" or game.Players.LocalPlayer.UserId == 0 then
game.Workspace.Part.Visible = true
game.Workspace.Part.CanCollide = true
end
It'd probably have to be client-sided like that instead of going to the server so it's only visible to the localplayer (owner).
2 comments
0
Thank you so much for the script!! But what does that mean? Do I just put the script inside the Part? I'm so sorry, I'm very new to scripting, I hope you can help me.
0
Sorry late comment haha. Client side means everything happens only on the client's computer, so no one else will see what happens except the person who runs the script. Server sided means it runs on the server so everyone sees what happens - so only the person you want it to open to (the localplayer - the owner) sees it open and can go through but no one else can.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
Do a while loop that checks if the player is in the game and if there is that certain player then the part will be visible.
I'm so sorry, but do you mind if you can explain more?
If you'd want it to be like that, you need to make it client sided.