What does game:GetService() do. Ive read that :GetService() gets a service just like its name but I never understood how it works. I used it in
https://education.roblox.com/en-us/resources/intro-to-coding-coding-3-creating-a-point-giving-part
to make the point giving Part but when I removed it the code still works normally. Can someone explain to me what It does and give some examples? Thank You
game:GetService("Workspace")
are basically the same as game.Workspace
, but some service cannot use that way (game.Workspace) most script-er recommended using game:GetService()
except for workspace.
local Workspace = game:GetService("Workspace") -- is the same as local workspace = game.Workspace
Hope my badly made answer helped