Hi guys! How can I make a script that turns on computer / electricity in roblox house. And to turn on electricity, the players needs to collect 5 parts around the map. After the players collected the parts, the electricity will turn on, in the house. I’ve searched up many on youtube / google, but nothing found. I don’t know how can I make this… Sorry if my english is not correct
Hello, Mrattila!
I’m not sure if this will help
function onClicked()
game.Workspace.Part(could be anything).SurfaceLight.Enabled = true
end
script.Parent.ClickDetector.MouseClick:Connect(onClicked)
You will need a click detector in the part, and you will have to keep the light disabled so it can be enabled.
1 Like
It would look something like this. I also forgot to say you can use any light.
1 Like
if player.Backpack:FindFirstChild("Part1") and player.Backpack:FindFirstChild("Part2") then -- and so on
Electricity.Enabled = true
end
1 Like
Sure, and how can I do that, if all the 5 objects are collected around the map, then only enable the light?
EDIT: nothing @thecoolgenerator asked my question
1 Like