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

Won't change the Bool?

Asked by 10 years ago

Basically, I add a value to the player on enter.

game.Players.PlayerAdded:connect(function(player)
Rod = Instance.new('BoolValue',player)
Rod.Value = false
Rod.Name = "Rod"
Plate = Instance.new('BoolValue',player)
Plate.Value = false
Plate.Name = "Plate"
Orb = Instance.new('BoolValue',player)
Orb.Value = false
Orb.Name = "Orb"
end)

^ - Script, not LocalScript

Then, in each item I have it so when you pick up the tool it changes the bool. (It's the same for all three.)

script.Parent.Touched:connect(function(player)
if player.Parent:findFirstChild('Humanoid') ~= nil then
game.Players:GetPlayerFromCharacter(player.Parent):WaitForChild('Orb').Value = true
else
-- Do nothing..
end
end)

^ - Script, not LocalScript

And when you die, it's supposed to respawn it.

character.Humanoid.Died:connect(function()
if Orb.value == true then
    OrbClone = game.ServerStorage["Midnight Moon Shrine"]["Mysterious Blue Orb"]:clone()
    OrbClone.Parent = game.Workspace["Midnight Moon Shrine"]
end
if Rod.value == true then
    RodClone = game.ServerStorage["Midnight Moon Shrine"]["Mysterious RedRod"]:clone()
    RodClone.Parent = game.Workspace["Midnight Moon Shrine"]
end
if Plate.value == true then
    PlateClone = game.ServerStorage["Midnight Moon Shrine"]["Mysterious Gold Plate"]:clone()
    PlateClone.Parent = game.Workspace["Midnight Moon Shrine"]
end
Orb.value = false
Rod.value = false
Plate.value = false
end)

^ - Script, not LocalScript

It still says Orb is an invalid member of Player. Help?

0
What is erroring? I don't see any statement which could trigger the error you stated. BlueTaslem 18071 — 10y
0
There are no errors. LennyTheLucario 45 — 10y

Answer this question