Saturday, August 10, 2024

Footstep on terrain physic

 Footstep on terrain physic

>see the video


This is the video that I'm showing terrain physic by my character left foot track on snow.

Remote Event

Remote Events and Callbacks

Roblox experiences are multiplayer by default, so all experiences inherently communicate between the server and the players' connected clients. In the 

simplest case, as players move their characters, certain Humanoid properties, 

such as states,  are communicated to the server, which passes this information 

to other connected clients.

Remote events and callbacks let you communicate across the client-server 

boundary

>see official hub

Every local functions, such as clicking on screen, clicking on GUIs and others are

only show on local player view if you want to make it show on server or sending

datas to server you need to use Remote Event

My Example

(1) Create a ScreenGui, a button in StarterGui


(2) Create a RemoteEvent in Workspace


(3) Create a Local Script in the button and Script in Workspace. Coding by follow 

my steps



Local Script:

local ReplicatedStorage = game.Workspace
local remoteEvent = ReplicatedStorage:WaitForChild("RemoteEvent")
function onclick()
remoteEvent:FireServer()
end
script.Parent.MouseButton1Click:connect(onclick)

Script:
local ReplicatedStorage = game.Workspace
local remoteEvent = ReplicatedStorage:WaitForChild("RemoteEvent")
local function XD(plr)
local part = Instance.new("Part") --create a part at 0,10,0
part.Position = Vector3.new(0,10,0) 
part.Parent = game.Workspace
end
remoteEvent.OnServerEvent:Connect(XD)

4. Finished





Movement of branches

 Movement of branches

>see the video

I made a movement of bush. There branches will moving when we touch it, but there still have a problem. when we are inside the bush, it's will keep moving and that looks weird.

Thursday, August 1, 2024

Footstep on terrain physic

 Footstep on terrain physic >see the video This is the video that I'm showing terrain physic by my character left foot track on snow.