Cutscenes show up to all players instead of just one player

I have so worked so hard on the cutscenes that I need a simple issue fixed which anybody can help me on this and quickly get me past this symbolic brick wall I have encountered.

  1. What do you want to achieve? Keep it simple and clear!

I would like the cutscenes script to only apply to the player touching the cutsceneblock part which triggers the cutscene.

I used this script: Piggy Cutscene Kit (Accurate) - Creator Store

  1. What is the issue? Include screenshots / videos if possible!

It works, it works great but everybody who touches the part which triggers the cutscene, causes every player to watch the same cutscene. This messes up my game cause now I cannot have the cutscenes without everybody being interrupted with a cutscene triggered by another player. It is already using localscript but that isn’t stopping everybody from being interrupted in the game to watch the same cutscene only one player should be watching.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I found one thread here on this forum but the script I am using does not use the Fire All Clients command so I am stuck.

https://devforum.roblox.com/t/local-script-running-for-all-players-not-just-one/1563681

I am looking for another script but then I would have to change everything which I worked so hard for.

How can I restrict or reword the cutscene script so that only one player who touches the cutscene block can view the cutscene and it not be shown to everybody?

Located in StarterGUI, folder called: “Cutscenes”:

local Camera = game.Workspace.CurrentCamera

local Character = game.Players.LocalPlayer.Character

local TService = game:GetService("TweenService")

local CamFolder = game.Workspace.CamFolder

CanPlayCutscene = true

local function InterpolateCamera(StartCam, EndCam, Duration)
	Camera.CameraType = Enum.CameraType.Scriptable
	Camera.CFrame = StartCam.CFrame
	local TInfo = TweenInfo.new(Duration, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0)
	TService:Create(Camera, TInfo, {CFrame = EndCam.CFrame}):Play()
	wait(Duration)
	print("Done!")
end

local function FadeIn()
	local Fade = script.Parent.Parent.AdditionalGui.FadeFrame
	TService:Create(Fade, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0), {BackgroundTransparency = 0}):Play()
end
local function FadeOut()
	local Fade = script.Parent.Parent.AdditionalGui.FadeFrame
	TService:Create(Fade, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0), {BackgroundTransparency = 1}):Play()
end

local function typewrite(object,text)
	for i = 1,#text,1 do
		object.Text = string.sub(text,1,i)
		wait(0.09)
	end
end


--Finally, the cutscene:
local function PlayCutscene()
	--GUI assets:
	local DGui = script.Parent.Parent.DialogGui
	local CharName = DGui.CharacterName.TextLabel
	local DText = DGui.DialogFrame.Dialog
	
	wait()
	script.Parent.Parent.AdditionalGui.FadeFrame.BackgroundTransparency = 0
	wait(1.5)
	InterpolateCamera(CamFolder.Cam0, CamFolder.Cam0, 1)
	wait(2)--Time for start cutscene
	FadeOut()
	wait(2)
	DGui.Enabled = true--VERY IMPORTANT, DON'T FORGET TO PUT IT!
	
	--Appear "You escaped":
	TService:Create(script.Parent.Parent.AdditionalGui.YouEscapedLabel, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0), {TextTransparency = 0}):Play()
	
	--Change character assets:
	CharName.Text = "Fat Cat"--Character Name
	CharName.TextColor3 = Color3.fromRGB(255, 255, 255)--Character name color.
	DText.TextColor3 = Color3.fromRGB(255, 255, 255)--Dialog color.
	
	local Play = script.Music1:Play()
	local Play = true
	
	typewrite(DText, "Angel Girl Brianna defeated me last time.")
	
	wait(4)--Time before interpolate the camera again, change if you want.
	
	CharName.Text = "Fat Cat"--Character Name
	CharName.TextColor3 = Color3.fromRGB(255, 255, 255)--Character name color.
	DText.TextColor3 = Color3.fromRGB(255, 255, 255)--Dialog color.

	local Play = script.Music2:Play()
	local Play = true

	typewrite(DText, "I will get my revenge on you. Hahahaha")
	
	wait(4)--Time before interpolate the camera again, change if you want.

	InterpolateCamera(CamFolder.Cam0, CamFolder.Cam1, 2)

	CharName.Text = "Fat Cat"--Character Name
	CharName.TextColor3 = Color3.fromRGB(255, 255, 255)--Character name color.
	DText.TextColor3 = Color3.fromRGB(255, 255, 255)--Dialog color.

	local Play = script.Music3:Play()
	local Play = true

	typewrite(DText, "Minion!!! Redeem yourself. Capture her now!!!")

	wait(4)--Time before interpolate the camera again, change if you want.
	
	--Disappear "You escaped":
	TService:Create(script.Parent.Parent.AdditionalGui.YouEscapedLabel, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0), {TextTransparency = 1}):Play()
	
	InterpolateCamera(CamFolder.Cam1, CamFolder.Cam2, 3)
	
	CharName.Text = "Minion"--Character Name
	CharName.TextColor3 = Color3.fromRGB(255, 255, 255)--Character name color.
	DText.TextColor3 = Color3.fromRGB(255, 255, 255)--Dialog color.

	local Play = script.Music4:Play()
	local Play = true

	typewrite(DText, "Yes sir!!! Right away!!!")
	
	wait(4)--Time before interpolate the camera again, change if you want.
	
	
	InterpolateCamera(CamFolder.Cam3, CamFolder.Cam3, 4)

	CharName.Text = "Angel Girl Brianna"--Character Name
	CharName.TextColor3 = Color3.fromRGB(255, 255, 255)--Character name color.
	DText.TextColor3 = Color3.fromRGB(255, 255, 255)--Dialog color.

	local Play = script.Music5:Play()
	local Play = true

	typewrite(DText, "I need to figure out how to get to the police station.")

	wait(4)--Time before interpolate the camera again, change if you want.
	
	CharName.Text = "Angel Girl Brianna"--Character Name
	CharName.TextColor3 = Color3.fromRGB(255, 255, 255)--Character name color.
	DText.TextColor3 = Color3.fromRGB(255, 255, 255)--Dialog color.

	local Play = true

	typewrite(DText, "To have the fat cat and his minion arrested!!!")

	wait(4)--Time before interpolate the camera again, change if you want.
	
	DGui.Enabled = false
	FadeIn()
	wait(1.5)
	Camera.CameraType = Enum.CameraType.Custom
	Camera.CameraSubject = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
	wait(1)
	FadeOut()
	
end

game.Workspace.CutsceneBlock.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") and hit.Parent.Humanoid.Health >0 and CanPlayCutscene == true then
		CanPlayCutscene = false
		PlayCutscene()
	end
end)
2 Likes

Look into Event:FireClient(PlayerInstance) instead of Event:FireAllClients()

1 Like

I put the entire single localscript in the thread as it only is one for the cutscenes, in the GUI folder. If this script is fixed then the other cutscenes are fixed too so I do not need to post them all. All I need to do is figure out how to add: Event:FireClient(PlayerInstance) to the script which I posted here.

1 Like

I do appreciate you bringing this up though. I just have to figure out how to add that in the script the right way.

1 Like

I don’t know what else to do.

I paid a scripter over 2,000 robux and I don’t even know if it is working properly. I am losing money fast and may still have these issues.

She went in Roblox studio to the cutscene script and I still don’t know if anything was really changed. She probably fixed some bugs with the script but I don’t know about adding the event or whatever it is that will work.

That is why I don’t like making games in Roblox (I’m talking about games games here, not something called a game when it is not). It’s all paying scripters right and left and I have limited monthly income. Then I keep running into issues which means I dish out more money.

It scares the heck out of me. That is why I prefer just hiking simulators and things which don’t require possible complex scripting.

Please help me anybody. I just got scammed out of 1K and almost got banned by Roblox for chatting angry after I was scammed by Shadow. Then I got scammed out of 2K by a kid who said she would fix the script. Then I paid another 1K in robux for another person who acted like he can fix it but did not fix it.

I am wasting around robux like it means nothing and NOBODY IS FIXING ANYTHING.

PLEASE HELP ME!!! I’m sorry for the caps but please help me!!!

I have now been scammed four different times regarding a Roblox scripter. The fourth time I lost $33 in real money. So now I have only 6 robux to my name, and lost $33 in real USD.

I keep finding scammers and I report them with evidence to Roblox support, they never get banned but I am constantly worried about warnings and ban threats. Yet the scammers are free to scam more and more people on Roblox.

If the script you provided is a localscript, then your touched connection is the reason why, it will fire every time a player touches it, even if it’s not the localPlayer.

You can fix it by checking if the hit.Parent instance is the localPlayer’s character:

workspace.CutsceneBlock.Touched:Connect(function(hit)
	if hit.Parent ~= Character then
		return
	end
	
	if hit.Parent:FindFirstChild("Humanoid") and hit.Parent.Humanoid.Health >0 and CanPlayCutscene == true then
		CanPlayCutscene = false
		PlayCutscene()
	end
end)

change that to…

game.Workspace.CutsceneBlock.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") and hit.Parent.Humanoid.Health >0 and hit.Parent == game.Players.LocalPlayer.Character and CanPlayCutscene == true then
		CanPlayCutscene = false
		PlayCutscene()
	end
end)
1 Like

Im sorry I just saw this and didn’t know this was here. I will test this. If it works then I can proceed and cut my loses. I learned from losing robux and losing U.S. Dollars to scammers. So I will test this in the script and if it works then I will make sure to mark solution and this thread can close.

Thank you for helping!!!

1 Like

Make a remote event in ReplicatedStorage called StartCutscene.

--ServerScript in ServerScriptService
local trigger = workspace:WaitForChild("Where this is")
local players = game:GetService("Players")
local db = false

trigger.Touched:Connect(function(hit)
	if db then return end
	local player = players:GetPlayerFromCharacter(hit.Parent)
	if player then db = true
		game.ReplicatedStorage.StartCutscene:FireClient(player)
		task.wait(2) db = false
	end
end)

--then in your local script add
game.ReplicatedStorage.StartCutscene.OnClientEvent:Connect(PlayCutscene)

Basically use a ServerScript to call the correct client script. As is all the client scripts are firing off the trigger. This is more of a kind of how it should look example.

1 Like

Yours is a solution too, I don’t know which one worked but the cutscene issue is no more. My obby now works, and I can proceed into cutting my loses and promote my obby with my friends agreeing to show their friends and word of mouth now that the issue has been fixed. My only loses in the long run: I lost $30 to Maxwell a fake scripter plus all my robux at one time for trying to get this script fixed, and it was fixed thanks to your help and the other programmers help. I have to cut my loses which is okay since I can recoup the lost robux with my obby getting popular. As to the $30, that is a drop in the bucket for what issue has now been fixed. Thank you so much,

I have tested this on a not so fast internet connection and had my alt roblox account on a mobile phone using DATA service. I confirmed the cutscenes are not playing for all users at the same time and is playing separate, as intended. So the issue has been resolved after testing.

1 Like

That is good. And I really. REALLY dont recommend paying for other people to work. I don’t trust them, you shouldn’t either.
Anyways I wish you the best of luck!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.