How to make a part that gives you a tool in ROBLOX Studio.
Code:
local click = script.Parent:WaitForChild('Click')
local rs = game:GetService('ReplicatedStorage')
click.MouseClick:Connect(function(player)
local bp = player.Backpack
if bp:FindFirstChild('Cube') then
bp.Cube:Destroy()
local tool = rs:WaitForChild('Cube'):Clone()
tool.Parent = bp
else
local tool = rs:WaitForChild('Cube'):Clone()
tool.Parent = bp
end
end)
Негізгі бет Ойындар How to make a part that gives you a tool (ROBLOX Studio)
Пікірлер: 29