i like to know about double script in one script (2 script in one board(2x1)) example: i want to make a button door also a light above it goes on when the door open can somebody help me with this one.
You have three parts in Workspace: The Door; The Button, and the Light Part.
In the button, you are going to insert a server script:
--Variables local Button = script.Parent local Light = game.Workspace.Light local ClickDetector = script.Parent:WaitForChild('ClickDetector') local Door = game.Workspace.Door --Code ClickDetector.MouseClick:Connect(function(plr) --when player clicked button --To open door Door.Transparency = 0.5 Door.CanCollide = false Light.PointLight.Enabled = true --If you want to close the door wait(2) Door.Transparency = 0 Door.CanCollide = true Light.PointLight.Enabled = false end)
That is it.