Local script code door not working

So I made this code door which needs to be imported from the replicated storage to the workspace by a local script, so only that player can see it. When I import it in the workspace the serverscripts in the code door don’t work anymore. Does someone know why that is?

1 Like

Could you post more info and provide the code? That would be helpful to anyone trying to help because we aren’t given much except for a description of your problem.

I know but the code is just this:

Codedoor.Parent = workspace

Local script^

Because you set Codedoor’s parent in client, on server it’s still in replicated storage or else where it was first touched or inserted

But how would I make it work for the client in the workspace.

1 Like

Maybe try cloning it instead,

local codeDoor = Codedoor:Clone()
codeDoor.Parent = workspace

I am clonning it to the workspace already

1 Like

If you want it only for client, you can remove server script, it’s useless here, cheaters can noclip through doors, if i were you i would create simple client-side anticheat for noob cheaters who can’t remove it and then i would use all of code and stuff on client