The wiki page says that this method will return true
when the user presses the “run” button but false
when the user presses the “play” button.
The issue here is that :IsRunMode() is returning true
in play mode in server-side scripts (normal Scripts with default RunContext).
Expected behavior
I expect :IsRunMode() to return false
in both the client and the server if I pressed the “play” or “play here” buttons rather than the “run” button.
This is not a bug. You are mistaken i believe.
RunService:IsRunMode() does not exist as a function and is only the name of each of the function like shapecasts you do not use a BlockCast by doing WorldRoot:ShapeCast(). If you are trying to check if you are in studio then do
local RunService = Game:GetService("RunService")
If RunService:IsStudio() then print("You are playing in roblox studio")
end
Let me know if i am incorrect as i am not in studio.
edit: This is not an issue you are actually mistaken it is supposed to return true when you press the play button
edit 2: This is an actual issue i was mistaken sorry. It is not supposed to return true in play mode
It is a function, I even linked the wiki page to it. It is also implemented in Studio.
Yes i just read it and i realise know i was mistaken when i said it was not a function sorry about that. I also have been mistaken on what i have said as i now realise the what the issue is. Sorry for any inconvenience.
Thanks for the report! We’ll follow up when we have an update for you.
3 Likes