#error "Expected identifier when parsing expression, got ')'
103 messages · Page 1 of 1 (latest)
idk how to fix this
when i type the command /boderman in the chat it will wait 5 seconds and show a text label. that is what im trying to do
if game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(message)
if string.lower(message) == '/boderman' then
wait (5)
script.Parent.Visible = true
end
end)
end)
i will try
doesnt work
for some reason
ill read you errors
Players.LuniDoge.PlayerGui.bodergui.Frame.Script:8: Expected 'then' when parsing if statement, got <eof>
Oh... I see...
game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(message)
if string.lower(message) == '/boderman' then
wait (5)
script.Parent.Visible = true
end
end)
end)```
This should work
yep
** You are now Level 1! **
works
thanks \
i appreciate it
uhh
it doesnt give any errors but it doesnt show the text
Use print and see where your script is not working
sorry im new to scripting how do i do that
game.Players.PlayerAdded:Connect(function(player)
print("Print")
player.Chatted:Connect(function(message)
print("Another Print?!")
if string.lower(message) == '/boderman' then
print("Wait what?! IS IT PRINTING?!")
wait (5)
script.Parent.Visible = true
end
end)
end)
and i just paste that into the script right?
Replace with what you have
Where are you using this script and what type of script is it?
Hm... Dont think you can use "PlayerAdded" outside of "ServerScriptService"
Try getting player in other way
idk
script
Where is the script
So you know what happen to everything inside the build-in "folders" that start with Starter when a player join?
I don't think script can run in gui
It 100000% can
screen gui > frame > textlabel and script
A script can modify gui elements ?
Yup
im sooo new to scripting so i dont have an idea
only for that player
If you put it in server script does it print ?
i thought of doing that
** You are now Level 2! **
Just to see if it print
It should
At least the first print
Dark, do you know if ".Chatted" can be used in server script?
I can
I? 
It*
Ah
Click on the script -> properties -> and I forgot the property to change
Runcontext
client or server
Server
Aight so here is how you should do it:
Create a server script inside : StarterGui > ScreenGui > Frame > TextLabel
Now open the script and get the player like this:
local plr = script.Parent.Parent.Parent.Parent.Parent.Paren
and now print(plr) to see if you got it
Tell us what it prints
And did anything you wanted happened?
no
Is the script inside "ServerScriptService"?
its inside the gui and the gui is inside serverscript
Put the gui inside staftergui
a
Well... "PlayerAdded" will not work in there (I think, 99% sure)
now its not printing
Now use a local script
alright
Trust me brother, it can, you can try it yourself
i want it so that when i type the command /boderman in chat it will wait 5 seconds and show a text label, then hide it after 5 seconds
Pretty easy to do, lemme open Roblox Studio
because i wanna make a remake of a blackout from a different roblox game
and there was a voice and subtitle
so ye
i wanna do the subtitle text
Ok so:
A Server Script CAN RUN inside the StarterGui
To use ".Chatted" you need a local script (nvm it can run on server too)
if you can make me a short tutorial one what to do so i dont mess it up for the 10th time
local plr = script.Parent.Parent.Parent.Parent.Parent
local TextLabel = script.Parent
TextLabel.Visible = false
local chatted = false
plr.Chatted:Connect(function(message)
if chatted == false then
chatted = true
if string.lower(message) == "/yes" then
TextLabel.Visible = true
task.wait(5)
TextLabel.Visible = false
end
chatted = false
end
end)
This should 100% work
okay
Get the code again, I changed a thing there to not be able to just spam the chat with the "command"
Awesome