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

Using ReplicatedStorage parts as Booleans?

Asked by 3 years ago

In my game, there is a sphere which is supposed to clone an object from workspace and place it within its position. The object depends on wether DbB is in the workspace or not The game says that object is not a valid member of sphere.~~~~~~~~~~~~~~~~~

while true do if game.Workspace.DbB and not script.Parent.TPEDO then if script.Parent.Coin then script.Parent.Coin:Destroy() end local c = game.ReplicatedStorage.TPEDO:Clone() c.Parent = script.Parent

end
if not game.Workspace.DbB and not script.Parent.Coin then
    if script.Parent.TPEDO then
        script.Parent.TPEDO:Destroy()
    end
    local c = game.ReplicatedStorage.Coin:Clone()
    c.Parent = script.Parent

end

end

~~~~~~~~~~~~~~~~~

0
can you edit the post and fix the script so it's easier for us to read AntoninFearless 622 — 3y
0
Nevermind fixed it boyparis 14 — 3y

Answer this question