So, this is the first time I made an entry in ** DevForum **. So I just build a game inspired by piggy called “CatyCaty[Alpha][Alpha]” I need help how to make a polling map like a pig? I’m still studying in ** script ** and ** newbie **. Can you ** help ** me a little?
What are my goals:
1.Create a ** map ** voting system
2.Create a ** gamemode ** voting system
3.Make it ** select a player at random to be a piggy ** if a player’s gamemode has been selected
Your help is greatly appreciated, ** thank you **!
Script:
1.IntermissionClient(LocalScript):
local timer = game.ReplicatedStorage.Info:WaitForChild(“Timer”)
local status = game.ReplicatedStorage.Info:WaitForChild(“Status”)
local camera = workspace.CurrentCamera
local intermission = script.Parent
local backBtn = intermission.backBtn
local menu = intermission.Parent.Menu
function countdown()
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
intermission.Intermission.Text = status.Value … “:” … timer.Value
end
timer.Changed:Connect(countdown)
function backClient()
local TweenService = game:GetService(“TweenService”)
local camTween = TweenService:Create(camera, TweenInfo.new(1.2), {CFrame = workspace.Menu.Cam1.CFrame})
intermission.Visible = false
camTween:Play()
camTween.Completed:Wait()
menu.Visible = true
end
backBtn.MouseButton1Click:Connect(backClient)
2.MenuClient(LocalScript):
local buttons = script.Parent
local menu = buttons.Parent
local intermission = menu.Parent.Intermission
local shop = menu.Parent.Shop
local playBtn = buttons.PlayBtn
local shopBtn = buttons.ShopBtn
local timer = game.ReplicatedStorage.Info:WaitForChild(“Timer”)
local status = game.ReplicatedStorage.Info:WaitForChild(“Status”)
local function countdown()
for countdown=10, 0, -1 do
status.Value = “Intermission”
timer.Value = countdown
wait(1)
end
for countdown=10, 0, -1 do
status.Value = “Voting map”
timer.Value = countdown
intermission.Voting.Map.Visible = true
wait(1)
end
end
local camera = workspace.CurrentCamera
camera.CFrame = workspace.Menu.Cam1.CFrame
camera.CameraType = Enum.CameraType.Scriptable
camera.CameraSubject = workspace.Menu.Cam1
function playClient()
local TweenService = game:GetService(“TweenService”)
local camTween = TweenService:Create(camera, TweenInfo.new(1.2), {CFrame = workspace.Menu.Cam2.CFrame})
menu.Visible = false
camTween:Play()
camTween.Completed:Wait()
local players = game:GetService(“Players”)
local template = intermission.Players.Template:Clone()
template.Parent = intermission.Players
template.Visible = true
template.Name = players.Name
template.Image = players:GetUserThumbnailAsync(players.LocalPlayer.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size100x100)
template.Username.Text = players.LocalPlayer.Name
intermission.Visible = true
countdown()
end
playBtn.MouseButton1Click:Connect(playClient)
function shopSystem()
local TweenService = game:GetService(“TweenService”)
local camTween = TweenService:Create(camera, TweenInfo.new(1.2), {CFrame = workspace.Menu.Cam3.CFrame})
local backTween = TweenService:Create(camera, TweenInfo.new(1.2), {CFrame = workspace.Menu.Cam1.CFrame})
menu.Visible = false
camTween:Play()
camTween.Completed:Wait()
shop.Visible = true
end
shopBtn.MouseButton1Click:Connect(shopSystem)
I need someone who pro at scripting tell me where should I edit the script to make it work.
(Sorry if my english is bad,I’m from malaysia actually )
[/quote][quote=“YTDevlog, post:1, topic:1165688, full:true”]
So, this is the first time I made an entry in ** DevForum **. So I just build a game inspired by piggy called “CatyCaty[Alpha][Alpha]” I need help how to make a polling map like a pig? I’m still studying in ** script ** and ** newbie **. Can you ** help ** me a little?
What are my goals:
1.Create a ** map ** voting system
2.Create a ** gamemode ** voting system
3.Make it ** select a player at random to be a piggy ** if a player’s gamemode has been selected
Your help is greatly appreciated, ** thank you **!
Script:
1.IntermissionClient(LocalScript):
local timer = game.ReplicatedStorage.Info:WaitForChild(“Timer”)
local status = game.ReplicatedStorage.Info:WaitForChild(“Status”)
local camera = workspace.CurrentCamera
local intermission = script.Parent
local backBtn = intermission.backBtn
local menu = intermission.Parent.Menu
function countdown()
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
intermission.Intermission.Text = status.Value … “:” … timer.Value
end
timer.Changed:Connect(countdown)
function backClient()
local TweenService = game:GetService(“TweenService”)
local camTween = TweenService:Create(camera, TweenInfo.new(1.2), {CFrame = workspace.Menu.Cam1.CFrame})
intermission.Visible = false
camTween:Play()
camTween.Completed:Wait()
menu.Visible = true
end
backBtn.MouseButton1Click:Connect(backClient)
2.MenuClient(LocalScript):
local buttons = script.Parent
local menu = buttons.Parent
local intermission = menu.Parent.Intermission
local shop = menu.Parent.Shop
local playBtn = buttons.PlayBtn
local shopBtn = buttons.ShopBtn
local timer = game.ReplicatedStorage.Info:WaitForChild(“Timer”)
local status = game.ReplicatedStorage.Info:WaitForChild(“Status”)
local function countdown()
for countdown=10, 0, -1 do
status.Value = “Intermission”
timer.Value = countdown
wait(1)
end
for countdown=10, 0, -1 do
status.Value = “Voting map”
timer.Value = countdown
intermission.Voting.Map.Visible = true
wait(1)
end
end
local camera = workspace.CurrentCamera
camera.CFrame = workspace.Menu.Cam1.CFrame
camera.CameraType = Enum.CameraType.Scriptable
camera.CameraSubject = workspace.Menu.Cam1
function playClient()
local TweenService = game:GetService(“TweenService”)
local camTween = TweenService:Create(camera, TweenInfo.new(1.2), {CFrame = workspace.Menu.Cam2.CFrame})
menu.Visible = false
camTween:Play()
camTween.Completed:Wait()
local players = game:GetService(“Players”)
local template = intermission.Players.Template:Clone()
template.Parent = intermission.Players
template.Visible = true
template.Name = players.Name
template.Image = players:GetUserThumbnailAsync(players.LocalPlayer.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size100x100)
template.Username.Text = players.LocalPlayer.Name
intermission.Visible = true
countdown()
end
playBtn.MouseButton1Click:Connect(playClient)
function shopSystem()
local TweenService = game:GetService(“TweenService”)
local camTween = TweenService:Create(camera, TweenInfo.new(1.2), {CFrame = workspace.Menu.Cam3.CFrame})
local backTween = TweenService:Create(camera, TweenInfo.new(1.2), {CFrame = workspace.Menu.Cam1.CFrame})
menu.Visible = false
camTween:Play()
camTween.Completed:Wait()
shop.Visible = true
end
shopBtn.MouseButton1Click:Connect(shopSystem)
I need someone who pro at scripting tell me where should I edit the script to make it work.
(Sorry if my english is bad,I’m from malaysia actually )