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

Script Doesnt Check Children And Bring Tool From ReplicatedStorage To Workspace?

Asked by 2 years ago

im making a script that, theres a prox prompt, once you activate it while holding an item, that item gets bring into workspace and removes the item, once all of them are in workspace, the script brings a tool from replicated storage and parents it to workspace, removes the original model with the items, adds a point to a task menu (shared for all players) enables a new prox point and disabled the original prox point, it was working before, but for some reason it stopped working and is now broken, can anyone help?

01local tomato = nil
02local choco = nil
03local ham = nil
04local orange = nil
05 
06script.Parent.Triggered:Connect(function(plr)
07    if plr.Character:FindFirstChild("Tomato Soup") then
08        game:GetService("ReplicatedStorage").Ingreds["Tomato Soup"].Parent = workspace.Cooking.Pot
09        plr.Character:FindFirstChild("Tomato Soup").Parent = nil
10        tomato = true
11    end
12    if plr.Character:FindFirstChild("Orange") then
13        game:GetService("ReplicatedStorage").Ingreds["Oranges"].Parent = workspace.Cooking.Pot
14        plr.Character:FindFirstChild("Orange").Parent = nil
15        orange = true
View all 39 lines...

Answer this question