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

If then statement won't work any help?

Asked by 5 years ago
Edited 5 years ago

simply won't work

nothing much to describe.

Just nothing happens..

local pa = script.Parent -- seat
while wait() do
    local occupant = script.Parent.Occupant
    if occupant == "Humanoid" then
        print("found") -- won't print this
        game.ReplicatedStorage.EnableCameraEvent:FireClient() -- won't fire
        print("fired") -- or this
    end
end

1 answer

Log in to vote
1
Answered by
Rare_tendo 3000 Moderation Voter Community Moderator
5 years ago

You'll need to do if occupant.Name == 'Humanoid' then

0
This should be a comment. User#19524 175 — 5y
0
Doesn't have to be a comment it was an answer seith14 206 — 5y
Ad

Answer this question