How do i access ServerStorage? How does Cframe work? How does Player touching something work? How does player equip work?
If i were to say game:WaitForChild("workspace), how do i go to the next thing? I can't just go game:WaitForChild("workspace").part?
Here are a few resources from the Roblox wiki that relate your questions.
Server Storage: https://developer.roblox.com/en-us/api-reference/class/ServerStorage
Accessing Services https://developer.roblox.com/en-us/api-reference/function/ServiceProvider/GetService
CFrames: https://developer.roblox.com/en-us/articles/Understanding-CFrame
Touched: https://developer.roblox.com/en-us/api-reference/event/BasePart/Touched
Tools https://developer.roblox.com/en-us/api-reference/class/Tool
WaitForChild: https://developer.roblox.com/en-us/api-reference/function/Instance/WaitForChild
To access ServerStorage, Workspace , etc. Use the word
:GetService()
Example:
game:GetService("Workspace")
or
game:GetService("ServerStorage")
CFrame is used to re-positioned or rotate at the object/part. That's for only the basics! I will not explain the whole complicated topic Example:
local redBlock = game:GetService("Workspace").RedBlock -- You change the position on the block redBlock.CFrame = CFrame.new(-2, 2, 4)
How does Player touching something work? When the player touched the part, and the Humanoid was detected. The function Touched Event will run! Example:
game.Workspace.Part54.Touched:connect(function(hit)-- Function of Touched event if hit.Parent:FindFirstChild("Humanoid") then-- if player has humanoid then print(hit.Name)-- It will print who touches the part end end) ~~~~~~~~~~~~~~~~~
Hi there. You can only access ServerStorage with a script (not a localscript).
Scrips changes server events, and localscript changes client ( or player ) events. ServerStorage has a "server" word in it, so I think scripts can only access it.
If you want to access to it from a local script, insert a remote event in replicatedStorage.For further information, go check in the Roblox dev hub "remote events"