Loading...
Loading...
Use for foundational Roblox experience development: deciding what runs on the client or server, where scripts and modules belong, how to structure reusable code, and how to handle everyday services, attributes, bindables, workspace objects, input, camera, raycasts, collisions, and CFrame-based gameplay scripting in Studio.
npx skill4agent add stackfox-labs/luau-skills roblox-coreScriptLocalScriptModuleScriptServerScriptServiceServerStorageReplicatedStorageReplicatedFirstStarterPlayerStarterGuiWorkspaceWaitForChild()CFrameCFrameRemoteEventRemoteFunctionroblox-networkingroblox-apiroblox-dataroblox-cloudroblox-oauthServerScriptServiceServerStorageReplicatedStorageReplicatedFirstStarterPlayerScriptsStarterCharacterScriptsStarterGuiStarterPackLocalScriptScriptRunContext = ClientScriptRunContext = ServerModuleScriptgame:GetService()WaitForChild()ModuleScriptCFramereferences/scripting-overview.mdreferences/client-server-runtime.mdreferences/script-locations-and-script-types.mdScriptLocalScriptModuleScriptreferences/services.mdgame:GetService()references/modulescripts-and-reuse-patterns.mdreferences/attributes.mdreferences/bindable-events.mdreferences/input-overview.mdreferences/workspace-basics-camera-raycasting-collisions-and-cframes.mdModuleScriptWaitForChild()CFrameReplicatedStorageScriptRunContextLocalScriptModuleScriptWaitForChild()TouchedCFrame-- ServerScriptService/SpawnController
-- Spawns and manages shared world state on the server.-- StarterPlayer/StarterPlayerScripts/InputController
-- Reads player input and drives local presentation on the client.-- ReplicatedStorage/Shared/Constants
-- Shared module used by both sides.
local Constants = {
MaxHealth = 100,
RoundLength = 120,
}
return Constantslocal Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RoundConfig = require(ReplicatedStorage:WaitForChild("RoundConfig"))
local function onPlayerAdded(player)
print(player.Name, "joined; round length:", RoundConfig.RoundLength)
end
Players.PlayerAdded:Connect(onPlayerAdded)local Workspace = game:GetService("Workspace")
local camera = Workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = CFrame.lookAt(Vector3.new(0, 10, 20), Vector3.new(0, 5, 0))
camera.Focus = CFrame.new(0, 5, 0)local part = script.Parent
part:SetAttribute("Active", true)
local changed = Instance.new("BindableEvent")
changed.Event:Connect(function(state)
print("State changed:", state)
end)
changed:Fire(part:GetAttribute("Active"))