yes, should work now???
This text will be blurred
yes, should work now???
This text will be blurred
yes, good job
(annoying char limit)
Testing it right now, thanks you guys!
local Player = game.Players.LocalPlayer
local ChristmasStartedValue = Player.PlayerGui.ChristmasGUI.Frame.EventStarted
local GiftPack = game.Workspace.Gifts
local GiftN = {
GiftPack.Gift1, GiftPack.Gift2, GiftPack.Gift3,
GiftPack.Gift4, GiftPack.Gift5, GiftPack.Gift6,
GiftPack.Gift7, GiftPack.Gift8, GiftPack.Gift9,
GiftPack.Gift10, GiftPack.Gift11, GiftPack.Gift12,
GiftPack.Gift13, GiftPack.Gift14, GiftPack.Gift15,
GiftPack.Gift16,
}
while true do
if ChristmasStartedValue.Value == false then
for _, GiftNs in pairs(GiftN) do
GiftN.Parent.Transparency = 1
GiftN.Parent.CanCollide = false
end
end
if ChristmasStartedValue.Value == true then
for _, GiftNs in pairs(GiftN) do
GiftNs.Parent.Transparency = 0
GiftNs.Parent.CanCollide = true
end
end
task.wait(0.5)
end
Please try the above, Iām not sure if it will work though.
ewww
Iām not sure sorry, @BriefTaste made that for loop thing so they might know how to fix it, I would use a for loop but not like that.
Just like i need to compare a lot of lines to one line, i do not need any loop, only check one which is task.wait(0.5), i donāt need something else
Actually changed this to:
local Player = game.Players.LocalPlayer
local ChristmasStartedValue = Player.PlayerGui.ChristmasGUI.Frame.EventStarted
local GiftPack = game.Workspace.Gifts
local GiftN = {
GiftPack.Gift1, GiftPack.Gift2, GiftPack.Gift3,
GiftPack.Gift4, GiftPack.Gift5, GiftPack.Gift6,
GiftPack.Gift7, GiftPack.Gift8, GiftPack.Gift9,
GiftPack.Gift10, GiftPack.Gift11, GiftPack.Gift12,
GiftPack.Gift13, GiftPack.Gift14, GiftPack.Gift15,
GiftPack.Gift16,
}
while true do
if ChristmasStartedValue.Value == false then
for _, GiftNs in pairs(GiftN) do
GiftNs.Transparency = 1
GiftNs.CanCollide = false
end
end
if ChristmasStartedValue.Value == true then
for _, GiftNs in pairs(GiftN) do
GiftNs.Transparency = 0
GiftNs.CanCollide = true
end
end
task.wait(0.5)
end
You could go line by line:
GiftPack.Gift1.Transparency = 1
GiftPack.Gift2.Transparency = 1
GiftPack.Gift3.Transparency = 1
but I wouldnāt recommend doing that.
donāt work, gift must be invisible
Yeah i used that before, but i need ~25 gifts and this is 100 lines
show us how the Gifts look like in the Explorer > Workspace so we would know what object to change its properties
Can you open the contents of the Gift?
There are meshes, donāt think they will help somehow
I donāt know what to do. I have only one solution to write line by line, but when i must write ~100 lines
I donāt know what the problem is but try this instead. The problem could be that the gifts havenāt loaded in the workspace yet so it doesnāt change its properties.
local Player = game.Players.LocalPlayer
local ChristmasStartedValue = Player.PlayerGui.ChristmasGUI.Frame.EventStarted
local GiftPack = game.Workspace.Gifts
local function valChanged()
if ChristmasStartedValue.Value == false then
for i, v in pairs(GiftPack:GetChildren()) do
v.Transparency = 1
v.CanCollide = false
end
elseif ChristmasStartedValue.Value == true then
for i, v in pairs(GiftPack:GetChildren()) do
v.Transparency = 0
v.CanCollide = true
end
end
end
ChristmasStarterValue.Changed:Connect(function()
valChanged()
end)
valChanged()
(also i cleaned the code so it will be more efficient)
Iām need to eat, so i will test it later, thanks you a lot anyways