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

How do you detect if a player is in studio?

Asked by 6 years ago

I'm looking for a way to detect if a player is in Roblox Studio, editing the game; so that I can enable testing materials when in Studio without having to separately disable and enable scripts.

I remember seeing it on wiki.roblox.com... I just can't remember what it was.

1 answer

Log in to vote
2
Answered by
theCJarmy7 1293 Moderation Voter
6 years ago
if game:GetService("RunService"):IsStudio() then
    print("Is in studio")
else
    print("Not in studio")
end

wiki link

0
Thank you. sweetkid01 176 — 6y
0
Yeah, thanks jonathanpecany100 0 — 4y
Ad

Answer this question