local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local messageStorage = ReplicatedStorage:WaitForChild("MessageStorage")
local messageValue = messageStorage:WaitForChild(player.Name)
local screenGui = Instance.new("ScreenGui")
screenGui.Parent = playerGui
local frame = Instance.new("Frame")
frame.Size = UDim2.new(1, 0, 0, 100)
frame.BackgroundColor3 = Color3.fromRGB(255, 223, 0)
frame.BackgroundTransparency = 0.5
frame.BorderSizePixel = 0
frame.Position = UDim2.new(0, 0, 0, 0)
frame.Parent = screenGui
local largeTextLabel = Instance.new("TextLabel")
largeTextLabel.Size = UDim2.new(1, 0, 0.5, 0)
largeTextLabel.TextSize = 24
largeTextLabel.TextWrapped = true
largeTextLabel.TextColor3 = Color3.new(1, 1, 1)
largeTextLabel.Parent = frame
local messageTextLabel = Instance.new("TextLabel")
messageTextLabel.Size = UDim2.new(1, 0, 0.5, 0)
messageTextLabel.Position = UDim2.new(0, 0, 0.5, 0)
messageTextLabel.TextSize = 18
messageTextLabel.TextWrapped = true
messageTextLabel.TextColor3 = Color3.new(1, 1, 1)
messageTextLabel.Parent = frame
local function updateMessage()
local message = messageValue.Value
if message and message ~= "" then
local pinnedUser = messageValue.UserPinned or "Unknown"
largeTextLabel.Text = "PINNED BY " .. pinnedUser
messageTextLabel.Text = message
frame.Visible = true
else
frame.Visible = false
end
end
messageValue.Changed:Connect(updateMessage)
updateMessage()```
Help, it works but where it was supposed to say "Pinned by (username)", it says Label there and also the description message too despite it was set to something else
#Help.
35 messages · Page 1 of 1 (latest)
Try debugging the updateMessage() function
So that means that the function isn't runnin
Try running it without the messageValue.Changed
Well it does like that those ui bars appear when I use that command but they just say Label
Alr
Wait, so when u did the debug what did u do exactly? What did u change?
local function updateMessage()
local message = messageValue.Value
if message and message ~= "" then
local pinnedUser = messageValue.UserPinned or "Unknown"
print("Debug - Pinned By:", pinnedUser)
print("Debug - Message:", message)
largeTextLabel.Text = "PINNED BY " .. pinnedUser
messageTextLabel.Text = message
frame.Visible = true
else
frame.Visible = false
end
end
What for debugging I do:
- print statements as soon as there is an if/else statement so I know what is running
Thats how i debugged
Ty debugging the else statement
kk
this?
it prints nothing
except
these
15:24:13.331 Stack End - Studio
15:24:13.331 Infinite yield possible on 'cloud_218303841.Model.GUIs.SignalGUI.Scripts:WaitForChild("Mode")' - Studio
15:24:13.331 Stack Begin - Studio
15:24:13.331 Script 'cloud_218303841.Model.GUIs.SignalGUI.Scripts.3', Line 10 - Studio
15:24:13.331 Stack End - Studio
15:24:17.816 Infinite yield possible on 'cloud_218303841.Model.GUIs.SignalGUI.Scripts:WaitForChild("Mode")' - Studio
15:24:17.816 Stack Begin - Studio
15:24:17.816 Script 'cloud_218303841.Model.GUIs.SignalGUI.Scripts.4', Line 11 - Studio
15:24:17.816 Stack End - Studio
15:24:17.816 Infinite yield possible on 'cloud_218303841.Model.GUIs.SignalGUI.Scripts:WaitForChild("Mode")' - Studio
15:24:17.816 Stack Begin - Studio
15:24:17.816 Script 'cloud_218303841.Model.GUIs.SignalGUI.Scripts.3', Line 10 - Studio
15:24:17.816 Stack End - Studio
now it prints this
15:24:43.360 Stack End - Studio
15:24:59.665 UserPinned is not a valid member of StringValue "ReplicatedStorage.MessageStorage.AdenExtra" - Client - LocalScript:40
15:24:59.665 Stack Begin - Studio
15:24:59.666 Script 'Players.AdenExtra.PlayerScripts.LocalScript', Line 40 - function updateMessage - Studio - LocalScript:40
15:24:59.666 Stack End - Studio
Ok i did some working out
now it works
Go ahead
it works now but where it was supposed to say "Pinned by (username)", it says Unknown instead and doesn't say the actual username who used the command
Pastebin pls, not random files
doesn't let me send
over the limit
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.