#bro guys i desperately need help, is there something where i can modify a property of a frame from a
1 messages · Page 1 of 1 (latest)
oh wait
bro guys i desperately need help, is there something where i can modify a property of a frame from a screengui where it becomes visible once a event fired that activates this
im sorry what?
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local DialogModule = require(ReplicatedStorage.DialogModule)
--references
local player = game.Players.LocalPlayer
local npc = script.Parent -- Reference to the NPC model
local npcGui = npc:WaitForChild("Head"):WaitForChild("gui")
local prompt = npc:WaitForChild("ProximityPrompt")
local StockGui = game.StarterGui.Stock.StockFrame
local dialogObject = DialogModule.new("The Seller", npc, prompt)
dialogObject:addDialog("Hey, wanna see what's in stock?", {"Yes, show me the shop.", "Nevermind."})
-- what happens when triggered
prompt.Triggered:Connect(function(player)
dialogObject:triggerDialog(player, 1)
end)
-- logic to go through dialogs
dialogObject.responded:Connect(function(responseNum, dialogNum)
if dialogNum == 1 then
if responseNum == 1 then
dialogObject:hideGui("Okay, here you go!")
end
end
if responseNum == 2 then
dialogObject:hideGui("Alright.")
end
end)
so i tried to put in a code inside where it would change the visiblity of the Ui but it doesnt work, heres the original code.
Try playergui instead of startergui?
** You are now Level 8! **
use player.PlayerGui.Stock.StockFrame instead
^^