If you guys need any help or want more videos you can join my discord and lemme know, don't forget to drop a like!
Thumbnail Artist: Macc#3051 on Discord
Join my discord server: / discord
Join my roblox group: https://www.roblox.com/groups/5821166...
Spike Trap script:
local TS = game:GetService("TweenService")
local Trap = game.Workspace.Trap
local TrapActivated = false
Trap.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent.Humanoid.Health = 0
end
end)
script.Parent.MouseClick:Connect(function()
if TrapActivated == false then
local Changes = {}
Changes.Position = Vector3.new(87.325, 12.305, -13.54)
local TrapActivateTween = TS:Create(Trap, TweenInfo.new(0.5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), Changes)
TrapActivateTween:Play()
TrapActivated = true
elseif TrapActivated == true then
local Changes2 = {}
Changes2.Position = Vector3.new(87.386, 4.257, -13.54)
local TrapDeactiveTween = TS:Create(Trap, TweenInfo.new(0.5, Enum.EasingStyle.Linear, Enum.EasingDirection.In), Changes2)
TrapDeactiveTween:Play()
TrapActivated = false
end
end)