ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก
How To MAKE a Moving Platform in Roblox!
ฝัง
- เผยแพร่เมื่อ 30 ก.ค. 2024
- How To MAKE a Moving Platform in Roblox!
🛠 How To MAKE a Moving Platform in Roblox! Thanks so much for watching, hope you guys have a great day! Subscribe 😎🛠
Credit to Kord_K for the base code (I just optimized it and made a tutorial for it):
devforum.roblox.com/t/jailbre...
🕸️Website: rustysillyband.com/
😎Subscribe: / @rustysillyband
💬Discord: / discord
🌴Roblox Group: www.roblox.com/groups/1729640...
👑Rusty Merch: www.roblox.com/groups/1729640...
⌚Timed Chapters:
0:00 Intro
0:12 Making the Platform
1:01 Server Script
3:35 Local Script
18:10 Outro
📝Tags:
#roblox #robloxstudio #gamedevelopment #lua #robloxstudioscripting #robloxstudiotutorial #tutorial #howto #advancedscripting #movingplatform
❓What is Roblox Studio?
🔎Roblox Studio lets you create anything and release with one click to smartphones, tablets, desktops, consoles, and virtual reality devices.
❓Who am I?
🔎I am a Roblox Studio Tutorial TH-camr that you should Subscribe to :)
Since this code is complicated, I will post it here incase you run into an error. However, this is not an excuse to just copy the code. Please follow the tutorial and learn from it. Thanks!
Code:
--{{ SERVICES }}--
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
--{{ VARIABLES }}--
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local Function
local lastPlatformCFrame
--{{ FUNCTIONS }}--
local function onCharacterDied()
Function:Disconnect()
end
local function onHeartbeat()
local rootPart = character:WaitForChild("HumanoidRootPart")
local raycastParams = RaycastParams.new()
raycastParams.FilterDescendantsInstances = {character}
raycastParams.FilterType = Enum.RaycastFilterType.Exclude
local raycastResult = workspace:Raycast(rootPart.Position, Vector3.new(0, -50, 0), raycastParams)
if raycastResult and raycastResult.Instance.Name == "Platform" then
local platformCFrame = raycastResult.Instance.CFrame
if lastPlatformCFrame then
local rel = platformCFrame * lastPlatformCFrame:inverse()
rootPart.CFrame = rel * rootPart.CFrame
end
lastPlatformCFrame = platformCFrame
else
lastPlatformCFrame = nil
end
end
character:FindFirstChild("Humanoid").Died:Connect(onCharacterDied)
Function = RunService.Heartbeat:Connect(onHeartbeat)
its not working for me
@@FOXeliterblx try use same names of blocks
what if i wanted to make another platform move? like let's say Platform2? how would i modify this?
Tysm! I looked at a bunch of other tutorials on moving platforms but none of them worked. But this one worked!
Thank you!! Great tutorial, very helpful
Thanks so much man, the structure of your code helped me to resolve an error I was trying to fix for 2 months. Keep it up!
Great tutorial on moving platforms, thanks for sharing!
Rusty, i wanna say thanks to you for the tycoon series, am so excited when will my tycoon game get completed. Everything worked, i added walls,more powerful dropper and many other things.idk why many people get unwanted errors but mine was perfect, animation worked, bugs got fixed.. the only mistake i made was, i forgot to update the tycoon in server storage, which made me confusing😅
I love how you up so frequently
I knew a plugin called something like “scene builder” it could make a lot of types of different effects on parts like levitating or kill part
can you make a tutorial on how to animate swords?, like how you did with guns
idk why but it dosent even move for me?
can you make one showcasing it working for multiple people? or will it already work for multiple people
I did everything step by step, and it doesn’t work, could something have changed and depend on the version of roblox
BRO THANK YOUU I LOVE U!!!!!!! LIKE AND SUB FRL
It didn't work with me
can you test my games?
user:Testingacc691
games:Slime attack!!! , Persent obby etc
and also can you recreate the tycoon series because it didnt work.Can you just put the scripts in the description?
How to moving platform 💀
Good Video rusty, I have a similar movement part
local TweenService = game:GetService("TweenService")
local part = script.Parent
local info = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, -1, true)
local newPosition = part.Position + Vector3.new(0, 10, 0)
local tween = TweenService:Create(part, info, {Position = newPosition})
tween:Play()
Hey great video the local script works but for some reason the tween script isn't working for me or i typed it wrong even tho reckecked it numerous times so i used this tween script then it works:
local TweenService = game:GetService("TweenService")
local Info = TweenInfo.new(
5,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
math.huge,
true,
0
)
local Goals =
{
CFrame = game.Workspace.Endpoint.CFrame
}
local Move = TweenService:Create(script.Parent, Info, Goals)
wait(1)
Move:Play()
Cool tutorial, but realy complicate code. Typed it by myself two times and it wasn`t worked . Then I cipied your code in comment and it start working