Answered by
6 years ago Edited 6 years ago
Hello, zmonds!
On the event, you recive a parameter, the player
I found this scripts on roblox official wiki
3 | local ReplicatedStorage = game:GetService( "ReplicatedStorage" ) |
4 | local createPartEvent = ReplicatedStorage:WaitForChild( "CreatePartEvent" ) |
6 | createPartEvent:FireServer() |
.
.
.
03 | local ReplicatedStorage = game:GetService( "ReplicatedStorage" ) |
04 | local createPartEvent = Instance.new( "RemoteEvent" , ReplicatedStorage) |
05 | createPartEvent.Name = "CreatePartEvent" |
07 | local function onCreatePartFired(player) |
08 | print (player.Name, "wants to create a part" ) |
09 | local newPart = Instance.new( "Part" ) |
10 | newPart.Position = Vector 3. new( 0 , 20 , 0 ) |
11 | newPart.Parent = game.Workspace |
14 | createPartEvent.OnServerEvent:Connect(onCreatePartFired) |
Good Luck with your games