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)
3 comments
Wowowowow. So what's your final question? You have like 10 questions in that.
https://idownvotedbecau.se/unclearquestion
how else will i learn?