I have a part in my level that I want to appear to every player at the beginning of the game, but only disappear when they do a certain task such as click on another block. I want it to be a localpart so that player can only advance in a level if they complete a certain task.

I have the part that I need to disappear located in 'lighting' as I've read that that is where localparts must be to be saved client-side, however I do not know how to:

  1. Make it appear when the player joins the game

  2. Make it disappear after another brick is clicked

I am not sure if this is possible, and I have been informed something about making localparts by enabling 'filtering-enabled' in workspace, however I don't know what to even do using that methods, as the wiki page does not really explain it very well..

EDIT

I've attempted to create a script to allow the player to touch a part in order to clone the localpart from lighting into the camera in workspace, so i have placed the following script into the 'touch switch'

local function touch()
	game.Lighting.Playerdoor:Clone().parent = game.Workspace.Camera
end

script.Parent.Touched:connect(touch)

In my head, this seems like it should work, however in testing it does not run, and I do not know how, this is however the first time i have tried to play around with localscripts and local parts, so it may be faar off.

2 comments

0

Sounds like you would need a local script to determine if the brick was clicked or not. If the game has FilteringEnabled then use this answer as a replacement to ClickDetector https://scriptinghelpers.org/questions/17049/#20421 otherwise, you would want a RemoteEvent to fire to the client script whenever someone clicks on the ClickDetector object.

0

However without an attempt we can not help you with your problem any further as ScriptingHelpers is not a request site, but more of a script explanation and fixing site.