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

Why is my ScreenGui not visible? I didn't make a StarterGui to PlayerGui error?

Asked by 5 years ago

As the title states my problem, why so does it not show? The camera moves to a specific location in my shop script but, it does not show the interacting GUIs.

game.ReplicatedStorage.eventFolder.cameraEvent.OnClientEvent:Connect(function()

local player = game.Players.LocalPlayer

local shop = player.PlayerGui.shopGui

local camera = workspace.CurrentCamera

local shopmodel = workspace.shopModel

local item = shop.itemValue

local buy = shop.shopFrame.buyButton

local shadow = buy.shadowButton

if shop.closedValue.Value == false then

if shop.openValue.Value == false then

shop.openValue.Value = true

buy:TweenPosition(UDim2.new(0,0,0,0), "Out", "Quint", 1,true)

item.Value = 1

camera.CameraType = Enum.CameraType.Scriptable

camera.CameraSubject = shopmodel.camera1Part

camera.CFrame = shopmodel.camera1Part.CFrame

shop.shopFrame.textLabel.Text = shopmodel:FindFirstChild("info"..item.Value.."Part").itemName.Value

buy.Text = shopmodel:FindFirstChild("info"..item.Value.."Part").itemPrice.Value

game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)

if player.Backpack:FindFirstChild(workspace.shopModel:FindFirstChild("info"..item.Value.."Part").itemName.Value) ~= nil then

buy.Text = "Bought"

buy.BackgroundColor3 = Color3.new(0.7, 0.7, 0.7)

shadow.BackgroundColor3 = Color3.new(0.5, 0.5, 0.5)

else

buy.Text = workspace.shopModel:FindFirstChild("info"..item.Value.."Part").itemPrice.Value

buy.BackgroundColor3 = Color3.fromRGB(85, 255,127)

buy.BackgroundColor3 = Color3.fromRGB(70, 212, 104)

end

end

end

end)

The code didn't let me make it a code-block.

0
wich error is showing in output? darkzerobits 92 — 5y
0
wich error is showing in output? darkzerobits 92 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

well, you don't said wich error is appearing in your output so.. i think that it isn't showing because you didn't set the visibility of the Guis, or if it is Enabled, in your script i didn't saw any line like ".visible = true" or ".enabled = true", maybe you has forgot to put these lines in it ^^

0
There was no error in the output, I am meaning, the GUI is not even showing the button which should be visible by the setting, I just thought it would be something in my script that is causing that to not be visible anymore by default. Araknala 14 — 5y
0
I found the solution but I'll mark you for finding the answer because you made me re-check my script, thank you! Araknala 14 — 5y
0
sorry for didn't help you properly, i will try my best next time ^^ darkzerobits 92 — 5y
Ad

Answer this question