still relatively new to luaU, i'm trying to make a script inside of a part called promptBlock which simply clones a gui called dialogueGui from replicatedstorage and onto the player's screen.
i'm using a localscript if that changes anything
local rep = game:GetService("ReplicatedStorage")
local click = script.Parent:WaitForChild("iEatClicks")
local gui = rep:WaitForChild("dialogueGui")
local promptBlock = script.Parent
local interactNoise = promptBlock:WaitForChild("interactNoise")
local players = game:GetService("Players")
function onClick(player)
print(player)
local playerGui = player:FindFirstChild("dialogueGui")
if playerGui then
local guiClone = gui:Clone()
guiClone.Parent = playerGui
else
print("something went wrong lol")
end
end
click.MouseClick:Connect(onClick)```