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

`Solved` How do I figure out if the player is in Studio?

Asked by
drcelt -3
4 years ago
Edited 4 years ago

I'm making something in my discord so that you can see whenever I join the game, however I don't want it to send a message using a webhook when I'm in studio? I think I have to use a if statement but I don't know.

1 answer

Log in to vote
1
Answered by
raid6n 2196 Moderation Voter Community Moderator
4 years ago
local RunService = game:GetService("RunService")

if RunService:IsStudio() then
    print("I am in Roblox Studio")
else
    print("I am in an online Roblox Server")
end

https://developer.roblox.com/en-us/api-reference/function/RunService/IsStudio

Ad

Answer this question