WindyTundra
(WindyTundra)
February 19, 2024, 10:03pm
#1
I was working on a cutscene type thing and the script is a little messy but it works, my issue is there is one line of script that wont work.
The bolded line is the part that doesnt work.
–Here’s the script
game.Players.LocalPlayer.PlayerGui.ScreenGui.BlackScreen.Visible=true
game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.Visible=true
game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame2.Visible=true
task.wait(4)
game.Players.LocalPlayer.PlayerGui.ScreenGui.BlackScreen.Visible=false
print(“check”)
task.wait(4.25)
game.Players.LocalPlayer.PlayerGui.ScreenGui.BlackScreen.Visible=true
game.Players.LocalPlayer.PlayerGui.ScreenGui.BlackScreen.BackgroundColor3 = Color3.fromRGB(255, 52, 52)
game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.Visible = false
game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame2.Visible=false
game.Players.LocalPlayer.PlayerGui.ScreenGui.BlackScreen.Transparency=0
task.wait(0.5)
game.Players.LocalPlayer:Kick(“Why Did You Press The Button?”)
–idk if theres a bug but it just wont work, ive tried everything.
1 Like
12345koip
(12345koip)
February 20, 2024, 8:20pm
#2
Try:
game:GetService("Players").LocalPlayer.PlayerGui.ScreenGui:WaitForChild("BlackScreen").Visible = false
It’s kind of hard to guess what else might be wrong and what to focus on if you don’t tell us if there’s an error (what it is if there is one)
Dev_Sie
(Sie)
February 20, 2024, 8:26pm
#3
um couple of things
Please show us the explorer where this script is located
pretty sure :Kick() doesn’t work in local scripts
you really should make ScreenGui variable
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local PlayerGui = Player:WaitForChild("PlayerGui")
local ScreenGui = PlayerGui:WaitForChild("ScreenGui")
now instead of having to do game.Players.LocalPlayer.PlayerGui.ScreenGui you can just do ScreenGui
WindyTundra
(WindyTundra)
February 20, 2024, 10:17pm
#4
it doesnt show an error whenever i run it
WindyTundra
(WindyTundra)
February 20, 2024, 10:21pm
#5
The script is located in StarterGui and i tried to make it a variable but the line of code still wont run or show an error.
Dev_Sie
(Sie)
February 20, 2024, 10:31pm
#6
does “check” print (screenshot where the script is)
yes check does print
(heres the screenshot)
WindyTundra
(WindyTundra)
February 28, 2024, 12:34am
#8
sorry about the wait but i think its a bug with .visible so i just used .transparency instead
system
(system)
Closed
March 13, 2024, 12:34am
#9
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.