Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

why dose my gui not working ?

Local

local player = game.Players.LocalPlayer
local gui = script.Parent
local frame = gui:WaitforChild('Background')
local logo = frame:WaitforChild('Logo')
local message = logo:Waitforchild('Message')
local introran = player:WaitforChild('Introran')
wait(5) -- define how long you want to wait before the gui runs
if introran == true then
frame.BackgroundTransparency = 1
logo.BackgroundTransparency = 1
logo.ImageTransparency = 1
message.BackgroundTransparency = 1
message.TextTransparency = 1
gui:Destroy()
else
wait(2)
for i = 1,0,-0.1 do
frame.BackgroundTransparency = i 
logo.ImageTransparency = i
message.TextTransparency = i
wait(0.1)
end
end

Script reapt

game.players.PlayerAdded:connect(function(player)
local Introran = Instance.new('boolvalue', player)
IntroRan.Name = 'IntroRan'
IntroRan.Value = false
end)

2 answers

It would be better if you told us what you were trying to accomplish, what is actually happening, what you want to happen, and if any errors are printed in the output. However I can see that you failed to capitalize Players in line 1 for Script reapt. So just make line 1 into game.Players.PlayerAdded:connect(function(player). Lua is sensitive to capitalization!

2 comments

0

well when i run the script i dose not work or even pop up

0

Did you fix the capitalization? Make sure your :WaitForChild() is not waiting forever! Try debugging with print() in multiple areas. This lets you know where the script is stopping!

I have the correct script for you.

Here is your Local script:

local player = game.Players.LocalPlayer
local gui = script.Parent
local frame = gui:WaitForChild('Background')
local logo = frame:WaitForChild('Logo')
local introran = player:WaitForChild('IntroRan')
local message = logo:WaitForChild('Message')
wait()
if introran == true then
frame.BackgroundTransparency = 1
logo.BackgroundTransparency = 1
logo.ImageTransparency = 1
message.BackgroundTransparency = 1
message.TextTransparency = 1
gui:Destroy()
else
wait(2)
for i = 1,0,-0.1 do
logo.ImageTransparency = i
message.TextTransparency = i
frame.BackgroundTransparency = i
wait(0.1)
end
wait(5) for i = 0,1,0.1 do
logo.ImageTransparency = i
message.TextTransparency = i
frame.BackgroundTransparency = i
wait(0.1)
end
for i = 0,1,0.1 do
frame.BackgroundTransparency = i
wait(0.1)
end
end

Here is your script reapt:

game.Players.PlayerAdded:connect(function(player)
local IntroRan = Instance.new('BoolValue', player)
IntroRan.Name = 'IntroRan'
IntroRan.Value = false
end)

Hope this helps, I also added an extra bit which should make it look cooler, if not, just remove the added parts :) `

This discussion is preserved as it was. New answers, comments, and votes are closed.