I am trying to make an obby that when you hit an invisible brick, more obstacles appear, but only for the people who touch the brick!
I do not know how to make this happen. I have tried using the bricks parented into the camera, and using both local and normal scripts, but nothing is working. I have checked the dev hub and found nothing. If one of you amazing people could explain this to me, I would be extremely grateful!
Foremost, make sure that FilteringEnabled it turned on for your game. I believe it is now default for all games, but just incase.
Next, I would use a Local Script in the PlayerGui or some other player related space and use a script similar to this:
local model = game.ReplicatedStorage:WaitForChild('ObbyParts') -- this would be where more of your obby parts are
local button = game.Workspace:WaitForChild('Button') -- the part you want to be the trigger
button.Touched:connect(function(p)
if p.Parent == game.Players.LocalPlayer.Character then
model:Clone().Parent = game.Workspace
end
end)
This will make the model located in ReplicatedStorage named ‘ObbyParts’ appear in ONLY the players workspace when they touch the button (a part in the workspace named Button)
Here’s how it looks on the client, and then the server (as you can see the obby is only visible in the players workspace):