欢迎来到“如何制作游戏”系列,本季我们重点关注越狱。在本集中,我们将为您首次加入游戏的团队选择系统工作。如果该视频对您有帮助,请不要忘记喜欢该视频并订阅以获得该系列的未来剧集。非常感谢您的收看!
—
DISCORD➤https://discord.gg/5zABugw
订阅➤http://www.youtube.com/subscription_center?add_user=ChewbaccaUverses
TWITTER➤https://twitter.com/Spooksletsky。
Hi can you pls check if there is somthing wrong with my script –Player Variables
local player=game.Players.LocalPlayer
local character
–Character Loading
player.CharacterAdded:connect(function(c)
character=c
end)
–Gui Variable
local gui=player:WaitForChild("PlayerGui")
local ui=gui:WaitForChild("ui")
–Load Assets
local assetObject=script:WaitForChild("Assets")
local assets={}
for a,b in next,assetObject:GetChildren() do
assets[b.Name]=b
end
–Service Shorthands
local teams=game:GetService("Teams")
local tS=game:GetService("TweenService")
local lighting=game.Lighting
function tween(t,s,d,p,o)
return tS:Create(o.TweenInfo.New(t.Enum.EasingStyle[s].Enum.EasingDirection[d]).p)
end
–ReplicatedStorage Shorthands
local rep=game.ReplicatedStorage
local events=rep:WaitForChild("Events")
local event=events:WaitForChild("event")
–Team Choose Function
function teamChoose()
local chooseUI=assets.teamChoose:Clone()
chooseUI.Parent=ui
–Tween Blur
tween(1,"Sine","Out",{Size=24},lighting.Blur):Play()
–Mouse Down Service
local finished
local prisonerDown,policeDown=chooseUI.police.MouseButton1Down:connect(function()
event:FireServer({reason="changeTeam"; team=teams.Prisoner})
finished=true
end).chooseUI.police.MouseButton1Down:connect(function()
event:FireServer({reason="changeTeam"; team=teams.Police})
finished=true
end)
repeat wait()until finished
–Untween Blur
tween(0,5,"Sine","Out",{Size=0},lighting.Blur):Play()
–Disconnect events
prisonerDown:disconnect ()
policeDown:disconnect()
–Delete UI
chooseUI:Destroy()
end
teamChoose()
Lol
why does my my blur does not work pls reply
Does anyone have a model of this because it doesn't work?
Hey make a series of getting payed by ppl to make games for ppl and I would get it free bc I gave u the idea C :
Didn’t work for me :*(
when ever I click something it docent let me edit it
7:26
and also what do u when it says Infinite yield possible on 'ReplicatedStorage.Events:WaitForChild("Events")'
it's saying ServerScriptService.Script:6: Expected ')' (to close '(' at column 37), got '.' what should i do? PLEASE REPLAY
can u put the hole script in the comments cos i messed up and i dont know were. so if u put both scripts in the comments we could copy it? if thats ok?
Spooks, may you please look over this and see if I made any mistakes? (If you see that there is different UI Names thats because I changed them)
Script I did:
— player variables
local player = game.Players.LocalPlayer
local character
— char loading
player.CharacterAdded:Connect(function(c)
character = c
end)
— gui variables
local gui = player:WaitForChild("PlayerGui")
local teamGui = gui:WaitForChild("TeamGui")
— load assets
local assetObject = script:WaitForChild("Assets")
local assets = {}
for a,b in next,assetObject:GetChildren() do
assets[b.Name]=b
end
— Service shorthands
local teams = game:GetService("Teams")
local TS = game:GetService("TweenService")
local lighting = game.Lighting
— rs short hands
local RS = game.ReplicatedStorage
local TEvents = RS:WaitForChild("TeamEvents")
local changeTeam = TEvents:WaitForChild("ChangeTeam")
function tween(t,s,d,p,o)
return TS:Create(o,TweenInfo.new(t,Enum.EasingStyle[s],Enum.EasingDirection[d],p))
end
— Team chosen
function TeamFrame()
local chooseUI = assets.TeamFrame:Clone()
chooseUI.Parent = teamGui
— tween blur
tween(1,"Sine","Out",{Size = 24},lighting.Blur):Play()
— mouse down service
local finished
local prisonerDown,policeDown = chooseUI.PrisonerBtn.MouseButton1Down:Connect(function()
changeTeam:FireServer({reason = "changeTeam";team = teams.Prisoner})
finished = true
end),chooseUI.PoliceBtn.MouseButton1Down:Connect(function()
changeTeam:FireServer({reason = "changeTeam"; team = teams.Police})
finished = true
end)
repeat wait() until finished
— untween blur
tween(0.5,"Sine","Out",{Size = 0},lighting.Blur):Play()
— disconnect events
prisonerDown:disconnect()
policeDown:disconnect()
chooseUI:Destroy()
end
TeamFrame()
altjought it didnt work it was a good way to distract my mind and im starting to understand lui script
someone upload a model of this plz
didnt work waisted an hour of my life
Rep.events
Make a supercar dealership i gonna do the game!!!!!
This is perfect for my game called: Prison Break
do you have a video for how to make a pick pocketing system?
Help i cant open service
what did you say at 6:47? i cant get it right!
Code plz?
Or your resolution on your screen recorder is shit
Doesn't work
off I need this script in description
Client:
–Player Variables
local player=game.PLayer.LocalPlayer
local Character
–Character Loading
player.CharacterAdded:connect(function(c)
character=c
end)
–GUI Variable
local gui=player:WaitForChild("PlayerGui")
local ui=gui:WaitForChild("ui")
–Load assets
local assetObject=script:WaitForChild("Assets")
local assets={}
for a.b in next.assetObject:GetChildren()do
assets[b.Name]=b
end
–Service shorthands
local teams=game:GetService("Teams")
local tS=game:GetService("TweenService")
local lighting=game.Lighting
function tween(t.s.d.p.o)
return tS:Create(o.TweenInfo.new(t.EnumStyle[s].Enum.EasingDirection[d]).p)
end
–ReplicatedStorage shorthands
local rep=game.ReplicatedStorage
local events=rep:WaitForChild("Events")
local event=events:WaitForChild("event")
–Team choose function
function teamChoose()
local chooseUI=assets.teamChoose:Clone()
chooseUI.Parent=ui
–Tween blur
tween(1."Sine"."Out".{Size=24}.lighting.Blur):Play()
–Mouse down service
local finished
local prisonerDown.policeDown=chooseUI.prisoner.MouseButton1Down:connect(function()
event:FireServer({reason="cahngeTeam":team=teams.Prisoner})
finished=true
end).chooseUI.police.MouseButton1Down:connect(function()
event:FireServer({reason="cahngeTeam":team=teams.Police})
finished=true
end)
repeat wait()until finished
–Untween blur
tween(0.5."Sine"."Out".{Size=0}.lighting.Blur):Play()
–Disconect events
prisonerDown:disconect()
policeDOwn:disconect()
–Delete UI
chooseUI:Destroy()
end
teamChoose()
Server:
local rep=game.ReplicatedStorage
local events=rep.Events
local event=events.event
–Event calling
event.OnServerEvent:connect(function(player.data)
if data.reason="changeTeam" then
player.Team=data.team
end
end)
Please Correction My Work
WHY DOES THIS NOT WORK!!!!!!!!!!!
PUT THE SCRIPTIN THE COMMENT OR I WILL UNSUBSCRIBE!!!!!!!!!!!!!
can someone copy and paste the script in the comments
this stinks
11:58 I got an error that was
Expected 'in' when parsing for loop, got '.'
The Service Is Disabled
Thanks!
and it didnt work!! i did like 2hours!!
umm.. i hope u tell us to press space on the 39, like this im really confusedddd i even cannot guess where to press it
dosent work
Are you using roblox studio?
11:05
Hey SpooksHD u were amazing builder to me and u make good scripts and all kind of stuff and i really like ur channel i liked and subscirbed!
At service shorthands, i see an error in function tween(t,s,d,p,o). I dunno why but i literally spent 30 minutes on doing this and failed
It wont show the team choose and blur who can help me
I bet he tried to make mad city
PLS PUT THE SCRIPT IN THE DESCRIPTION! I HAVE TO PAUSE THE VID TO KEEP UP
btw great video
Make a series how to make a keycard for cops team
Make a series how to make a keycard for cops team
Why me dont work
IT S NIT JAIL BREAK IT S AIL BREAK lol
Does anyone know why it doesn't let me click on service
can you make one with three teams
Please Script
didn't work and i watched 4 times