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

Script doesn't seem to be working for anything in StarterGui?

Asked by 4 years ago

When the player's character sits on a chair, some text labels, text buttons, and images show up for a decision to go fast or slow, in a folder in ScreenGui called Decision. The labels are set to visible = false but when I sit on a chair, no errors show in the output but the labels don't become visible. Any help? Here's the script (It's in StarterCharacterScripts)

01local fast = game.StarterGui.ScreenGui.Decision.Fast
02local slow = game.StarterGui.ScreenGui.Decision.Slow
03local hum = script.Parent.Humanoid
04hum:GetPropertyChangedSignal("Sit"):Connect(function(sit)
05 
06    if hum["Sit"] == true then
07        for _, child in pairs(game.StarterGui.ScreenGui.Decision:GetChildren()) do
08            child.Visible = true
09        end
10 
11        fast.Activated:Connect(fastt)
12        slow.Activated:Connect(sloww)
13    end
14 
15    if hum["Sit"] == false then
View all 29 lines...

Answer this question