nothing in output look line5 it doesnt work
while true do wait(120) game.Players.PlayerAdded:Connect(function(plr) plr.Chatted:Connect(function(msg) if game.Workspace.player.tool.Equipped == true and msg == "Rick give me all ur money" then game.Workspace.Door1.Transparency = 1 game.Workspace.Door1.CanCollide = false wait (60) game.Workspace.Door1.Transparency = 0 game.Workspace.Door1.CanCollide = true end end) end) end
The "while true do" is completely unnecessary as when you connect the function to an event (plr.Chatted) it will run every time the event fires without the need for a loop. Also, why is there a 120 second wait() before the function?
Equipped is not a property of the tool instance so instead we can just check for the tool inside of the player's character and game.Workspace.Player just doesn't exist and should be replaced with plr.Character if you are trying to find the character.
game.Players.PlayerAdded:Connect(function(plr) plr.Chatted:Connect(function(msg) if plr.Character:FindFirstChild("tool") and msg == "Rick give me all ur money" then game.Workspace.Door1.Transparency = 1 game.Workspace.Door1.CanCollide = false wait(60) game.Workspace.Door1.Transparency = 0 game.Workspace.Door1.CanCollide = true end end) end)