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

Why does it say this in the output?

Asked by 10 years ago

So I have a script. But in the output it says

18:55:16.588 - Effects is not a valid member of Part 18:55:16.589 - Script 'Workspace.Script', Line 6 18:55:16.590 - Stack End

Why?

BasePlate = game.Workspace.BasePlate
u="You are okay, don't worry"
y="Sike! You are going to die"
o="Haha, you're dead"

if BasePlate.Effects.Fire == true then
    BasePlate:Destroy()
else
    if BasePlate.Effects.Fire == false then
        print(u)
        wait(2)
        BasePlate.Effects.Fire = true
        print(y)
        wait(10)
        print(o)
    end
end

0
Did you check spelling and canalization between what you're referencing in the script and what the child of BasePlate is? GoldenPhysics 474 — 10y
1
There is either no child named "Effects" on the baseplate or as GoldenPhysics said, you spelled something wrong FearMeIAmLag 1161 — 10y

1 answer

Log in to vote
0
Answered by 10 years ago

Effects is not a property.

Instance.new("Message")
BasePlate = game.Workspace.BasePlate
Message =  Workspace.Message
u="You are okay, don't worry"
y="Psych! You are going to die" --Corrected spelling :P
o="Haha, you're dead"

if BasePlate:FindFirstChild("Fire") == true then --Use FindFirstChild
    BasePlate:Destroy()
else
    if BasePlate:FindFirstChild("Fire") == false then
        Message.Text = u --Print only works in the output...
        wait(2)
        Instance.new("Fire", BasePlate)
        Message.Text = y
        wait(10)
        Message.Text = o
    end
end
Ad

Answer this question