Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Script Doesnt Repeat Itself And Breaks? (UPDATED SCRIPT)

Asked by 2 years ago
Edited 2 years ago

im making a script that switches poses from a folder in replicatedStorage and a folder in workspace, and changes the value of the room to far, middle or close, you can close a curtain to stop the mosnter from killing you and resetting the script back to the start, but if u fail to you get kicked, but the script isn't working, It doesn't repeat the script once the monster goes back, if anyone could fix it, I would appreciate it,

Script (I updated the script a bit but it still doesn't repeat)

01local rep = game:GetService("ReplicatedStorage").Monsters
02local cur = script.Parent
03local isCurtainOpen = workspace.Curtaians["IsClosed?"]
04local place = script.Parent.Banana
05 
06game.Players.PlayerAdded:Connect(function(plr)
07        place.Value = "Far"
08        wait(math.random(35,60))
09        place.Value = "Middle"
10    cur.Far.Parent = rep
11    rep.Middle.Parent = cur
12        wait(math.random(35,60))
13        place.Value = "Close"
14    cur.Middle.Parent = rep
15    rep.Close.Parent = cur
View all 49 lines...

Answer this question