Hello, my last post this day until I clock out, I am making a horror / puzzle game where you have to spot the difference basically, and file a report to fix it, the report button does not change text and nothing gets fixed, no errors, and no warnings, here’s the script:
local type1 = script.Parent.Parent.Parent:WaitForChild("Type")
local room = script.Parent.Parent.Parent:WaitForChild("Room")
local reported = false
local cooldown = false
script.Parent.MouseButton1Click:connect(function()
script.Parent.Text = "Sent!"
if type1.Value ~= "" and room.Value ~= "" then
local room2 = workspace.Rooms:WaitForChild(room.Value)
local roomanom=room2:WaitForChild("Anomaly")
for i, v in pairs(room2.Furniture:GetChildren()) do
local anom=v:WaitForChild("Anomaly")
if v:IsA("Basepart") or v:IsA("Model") then
if anom.Value == true and reported == false then
if roomanom.Value == true then
reported = true
print(reported)
print(v.Types.Value)
print(type1.Value)
if v.Types.Value == type1.Value then
if v.Types.Value == "Disappearance" then
game.ReplicatedStorage.Resolve:FireServer("Disappearance", room2)
wait(4)
game.SoundService.Static:Play()
script.Parent.Parent.Parent.Static.Visible = true
wait(5.365)
script.Parent.Parent.Parent.Static.Visible = false
elseif v.Types.Value == "Movement" then
game.ReplicatedStorage.Resolve:FireServer("Movement", room2)
wait(4)
game.SoundService.Static:Play()
script.Parent.Parent.Parent.Static.Visible = true
wait(5.365)
script.Parent.Parent.Parent.Static.Visible = false
elseif v.Types.Value == "ExtraObj" then
game.ReplicatedStorage.Resolve:FireServer("ExtraObj", room2)
wait(4)
game.SoundService.Static:Play()
script.Parent.Parent.Parent.Static.Visible = true
wait(5.365)
script.Parent.Parent.Parent.Static.Visible = false
elseif v.Types.Value == "LightAnom" then
game.ReplicatedStorage.Resolve:FireServer("LightAnom", room2)
wait(4)
game.SoundService.Static:Play()
script.Parent.Parent.Parent.Static.Visible = true
wait(5.365)
script.Parent.Parent.Parent.Static.Visible = false
elseif v.Types.Value == "OpenCloseDoor" then
game.ReplicatedStorage.Resolve:FireServer("OpenCloseDoor", room2)
wait(4)
game.SoundService.Static:Play()
script.Parent.Parent.Parent.Static.Visible = true
wait(5.365)
script.Parent.Parent.Parent.Static.Visible = false
elseif v.Types.Value == "PictureAnom" then
game.ReplicatedStorage.Resolve:FireServer("PictureAnom", room2)
wait(4)
game.SoundService.Static:Play()
script.Parent.Parent.Parent.Static.Visible = true
wait(5.365)
script.Parent.Parent.Parent.Static.Visible = false
end
end
end
elseif anom.Value == false and reported == false then
if roomanom.Value == false then
reported = true
if script.Parent.Parent.Parent.Static.Transparency == 0 then
script.Parent.Text = "Report"
print("No Anomalies Detected.")
script.Parent.Parent.Detect.Visible = true
task.wait(1)
script.Parent.Parent.Detect.Visible = false
end
end
end
end
script.Parent.Text = "Report"
reported = false
end
end
end)
Here’s a video for better reference:
(I clicked the button while the door was open and when the light flickered.)