Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

(Answered) Script Doesn't Do Anything, Not Even Print The First Line?

Asked by 5 years ago
Edited 5 years ago

Today I've been working on a pending list in my game, I couldn't figure out where my script was break so I decided to type print "test" in a few places until I realized that the script isn't doing anything?

print "test3"
while wait() do
    print "test2"
if game.Workspace.MusicGenerator:FindFirstChild(""..game.Workspace.MusicScript.FolderNumber.Value.."") then
    print "test"
local CurrentId = game.Workspace.MusicGenerator[""..game.Workspace.MusicScript.FolderNumber.Value..""].SongId.Value
script.Parent.Text.Value = "Current Song ID Being Played: "..CurrentId..""
    end
end

I ran this script and checked the output and none of the prints worked? I Also Checked The Script's Properties And It Is Not Disabled. The Script Is Located In a textlabel, located in a Frame, located in a screen gui, located in StarterGui.

Someone Please Help!

0
is this from the client or server and wheres the script located in User#23365 30 — 5y
0
The script is from the client located in game>StarterGui>ScreenGui>Frame>TextLabel kizi3000 88 — 5y
0
@EXpodo1234ALT (The script is a regular script) kizi3000 88 — 5y
2
u cant run server scripts inside GUI objects, use Local scripts User#23365 30 — 5y
0
You don't really need to add answered, as there is already a thing that says it, but someone tell me if there's a reason why ihatecars100 502 — 5y

2 answers

Log in to vote
1
Answered by
Ziffixture 6913 Moderation Voter Community Moderator
5 years ago

Your syntaxing is very deprecated, it should be print("test3"), also the issue could be the script being disabled, that's a property, just uncheck it if so

0
@simplealgorithm I tried fixing it to print("test3") and the disabled box is not enabled, but it didnt work kizi3000 88 — 5y
0
Is the script inside of ServerScriptService? Ziffixture 6913 — 5y
0
No it was inside of StarterGUI Far Down Inside One Of My Gui's kizi3000 88 — 5y
0
Someone else answered my question in the comments, it was because it was a server script in startergui kizi3000 88 — 5y
0
Yeah, it should be In ServerScriptService, that’s why i asked, it cannot run there Ziffixture 6913 — 5y
Ad
Log in to vote
1
Answered by
SpiralRBX 224 Moderation Voter
5 years ago

Further onto what simplealgorithm said, You can now print in your format.

A suggested script would be:

print("test3")
while wait() do
    print("test2")
if game.Workspace.MusicGenerator:FindFirstChild(game.Workspace.MusicScript.FolderNumber.Value) then
    print("test")
local CurrentId = game.Workspace.MusicGenerator[""..game.Workspace.MusicScript.FolderNumber.Value..""].SongId.Value
script.Parent.Text.Value = "Current Song ID Being Played: "..CurrentId..""
    end
end
0
PS: I did not test this script, so I can not confirm it works. SpiralRBX 224 — 5y
0
but im sure the prints will work SpiralRBX 224 — 5y
0
The print wasn't the only problem, The main problem was because It was a server script in startergui kizi3000 88 — 5y

Answer this question