Day 4 learning how to script in roblox studio!
Автор: DogeDaScripter
Загружено: 2025-11-13
Просмотров: 1214
Описание:
Scripts:
Pick Up Script:
local takeflag = script.Parent
local FLAG_ANIMATION_ID = "rbxassetid://117985774755309" -- replace with your animation ID
takeflag.Touched:Connect(function(hit)
local char = hit.Parent
local hrp = char and char:FindFirstChild("HumanoidRootPart")
local hum = char and char:FindFirstChildOfClass("Humanoid")
if not (hrp and hum) then return end
if takeflag:FindFirstChild("FlagWeld") then return end
takeflag.Anchored = false
takeflag.CanCollide = false
local offset = Vector3.new(0, 5, 0)
takeflag.CFrame = hrp.CFrame * CFrame.new(offset)
local weld = Instance.new("Weld")
weld.Name = "FlagWeld"
weld.Part0 = hrp
weld.Part1 = takeflag
weld.C0 = CFrame.new(0, 3, 0)
weld.Parent = hrp
local anim = Instance.new("Animation")
anim.AnimationId = FLAG_ANIMATION_ID
local track = hum:LoadAnimation(anim)
track:Play()
end)
Teleport Pads Script:
local tp = script.Parent
local destination = game.Workspace.Destination
tp.Touched:Connect(function(hit)
local char = hit.Parent
if char:FindFirstChild("HumanoidRootPart") then
char:MoveTo(destination.Position)
end
end)
Change Teams Script:
local changeteam = script.Parent
local blueteam = game.Teams.BlueTeam
changeteam.Touched:Connect(function(hit)
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr then
plr.Team = blueteam
end
end)
Tags: (Ignore)
#chopin #roblox #scripting #scripting #luau #lua
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: