I am making a game where you find cubes by talking to people, I am also a new scripter to lua so sorry if I make a dumb mistake. Ok, for some odd reason my code thinks the boolvalue is false when true.
When boolvalue is checked if true:
script.Parent.Triggered:Connect(function(Player)
local ToolName = "WhiteCube"
local item = Player.Backpack:FindFirstChild(ToolName)
local value = game.ReplicatedStorage.WhiteCube.ininv
if value.Value == true then
print("Player has tool in backpack!")
workspace.Cube1.Transparency = 0
workspace.Cube1.CanCollide = true
else
print("Player does not have tool in backpack!")
local nocubeui = Player.PlayerGui.Nocubetxt
nocubeui.Enabled = true
wait(5)
nocubeui.Enabled = false
end
end)
When boolvalue.value is set to true:
local dialog = workspace.ballwizard.Hat.Dialog
local part1 = workspace.ballwizard.Hat
local part2 = workspace.ballwizard.Beard
local part3 = workspace.ballwizard.Part
local function onSelected(player, choice)
if choice == dialog.b1.b2.b3.b4.b5.b6.b7.b8.b9 then
print ("talked to wizard")
while true do
part1.Position = part1.Position + Vector3.new(0,-1,0)
part2.Position = part2.Position + Vector3.new(0,-1,0)
part3.Position = part3.Position + Vector3.new(0,-1,0)
wait(0.1)
end
end
end
dialog.DialogChoiceSelected:Connect(onSelected)
Any help is appreciated!

1 comment
Also, clients can see any changes made on the server's side. Servers can't see changes made by clients.