Regular Script
game.ReplicatedStorage.Wall.OnServerEvent:Connect(function(player,button)
--//Variables\\--
local replicated = game.ReplicatedStorage
local wall = replicated.BrickWall:Clone()
wall.Parent = game.Workspace
for i = 0,6,0.1 do
wall.CFrame = wall.CFrame * CFrame.new(0,i,0)
wait()
end
end)
Local Script
wait()
--//Variables\\--
local player = game:GetService("Players").LocalPlayer
local RemoteEvent = game.ReplicatedStorage.Wall
local button = game.Workspace.StarterGui.ScreenGui.TextButton
button.MouseButton1Click:Connect(function()
RemoteEvent:FireServer()
end)
I'm trying to make a wall/shield type thing that spawns when you click the gui and comes up from the ground.
