They are directly in ReplicatedStorage. The names are DialougeEvent and EndEvent.
1 Like
Okay, try using the following code below for your server script. Ive made multiple changes to it:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
-- Events
local Dialogue = ReplicatedStorage:WaitForChild("DialougeEvent")
local EndEvent = ReplicatedStorage:WaitForChild("EndEvent")
-- Values
local BlameValue = ReplicatedStorage:WaitForChild("BlameValue")
local ForgiveValue = ReplicatedStorage:WaitForChild("ForgiveValue")
wait(25)
if ForgiveValue.Value > BlameValue.Value then
print("YOU VOTED FOR FORGIVE")
local Monster_Image = "rbxassetid://5854700104"
game.ReplicatedStorage.VoteEvent:Destroy()
Dialogue:FireAllClients(Monster_Image,"Thank you. I will bring everybody back.")
workspace.Deadman:Destroy()
game.ReplicatedStorage.Everybody:Clone().Parent = workspace
wait(8)
Dialogue:FireAllClients(Monster_Image,"Hello, everybody.")
wait(5)
local Man_Image = "http://www.roblox.com/asset/?id=7103581270"
local Message = "It's.. you! I am sorry for killing you, I had to do it for money."
Dialogue:FireAllClients(Man_Image, Message)
wait(8)
Dialogue:FireAllClients(Monster_Image,"I forgive you.")
wait(8)
EndEvent:FireAllClients()
else
print("VOTED BLAME")
local Monster_Image = "rbxassetid://5854700104"
Dialogue:FireAllClients(Monster_Image,"...Goodbye.")
wait(5)
workspace.Monster:Destroy()
wait(5)
game.ReplicatedStorage.Police:Clone().Parent = workspace
wait(1)
local Police_Image = "rbxassetid://1483419652"
local Message2 = "What have you done? Down to prison he goes."
Dialogue:FireAllClients(Police_Image, Message2)
wait(5)
EndEvent:FireAllClients() -- blame is higher than forgive
end
If i understand you correctly, there is a quite primitive solution to this:
You can use a “If” event for both of the outcomes that could happen after the two Ints are compared.
So something like this:
Local Int1 = Your int`s name here
Local Int2 = Your second int here
Local Bool = Bool based on outcome
Wait(20) --Or however long the voting goes on for
If Int1.Value > Int2.Value then Bool. Value = true
Same thing vice versa.
I might be wrong tho, haven`t touched code in a month or so.
Sorry for replying after a long time. This doesn’t work.
Sorry for replying after a long time. This also doesn’t work.
1 Like