I took VRService.VREnabled from robloxs site, and put the kick line in it, but it wont print anything or kick me. (it is in a localscript in workspace). Im very new to scripting so sorry.
1 | local userInputService = game:GetService( "UserInputService" ) |
2 |
3 | local isUsingVR = userInputService.VREnabled |
4 | if (isUsingVR) then |
5 | print ( "has vr headset :D" ) |
6 | else |
7 | print ( "Turn on your VR headset! This game requires VR" ) |
8 | game.Players.Player 1 :Kick() |
9 | end |
First Put In in StarterGui Roblox Only Allows LocalScripts In The Player Also Dont Just Go Likegame.Players.Player1:Kick()
You Wont Be Able To Kick Anybody Else What I Will Do Is
local userInputService = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
local isUsingVR = userInputService.VREnabled
if (isUsingVR) then
print("has vr headset :D")
else
print("Turn on your VR headset! This game requires VR")
game.Players[Player.Name]:Kick()
end
`