I’m making a puzzle game, where there’s a riddle posted on a chalkboard, and when a player says the answer in chat, the door opens. When I tested it when the model was in workspace, it worked. But when I tested it from being cloned to workspace from ReplicatedStorage, it doesn’t work.
riddle = math.random(1, 10) answer = "e" if riddle == 1 then script.Parent.SurfaceGui.TextLabel.Text = "I have 104 keys, but only 3 locks, only one enter and only one escape, and I have space but no room. What am I?" answer = "keyboard" --etc.. end local player = game.Players.LocalPlayer local door = script.Parent.Parent.Door game:GetService("Players").PlayerAdded:Connect(function(player) player.Chatted:connect(function(msg) if string.sub(string.lower(msg), 1,8)==string.lower(answer) then door:Destroy() end end) end)
This script is placed inside the chalkboard, which is inside the entire level.