Ok so I am making a warn system and was wondering how I could make this work
prompinfo = PromptInfo.new()
promptinfo.PromptButton.Text = 'button text'
prompinfo.MiddleText.Text = 'MiddleText'
prompinfo.TopText.Text = 'TopText'
local function warn(playerToWarn, promptInfoA)
local warn = playerToWarn:Warn(promptInfoA) --holds the thread until the player presses ok or until the the promptinfo.Delay finishes and the prompt goes away
return warn.Result --returns true if the player said ok or delay is done and false if the player left
end
game.Players.PlayerAdded:Connect(function(plr)
local w = warn(plr, promptinfo)
if w = true then
print('Player '..plr.Name..' has said ok to the warning message')
end
end)