I was running a dialogue scene and camera change on a server script that activated when a player touched a part. I changed it to a local script within the StarterGui and it still runs for every player on the server. I don’t understand why… I’ve double and triple checked to make sure the server version has been deleted. Any help is greatly appreciated!
local part = game.Workspace:WaitForChild("Clip1"):WaitForChild("Clip")
local debounce = false
local camera = game.Workspace.Camera
local cam = game.Workspace.CamPart1
local TweenService = game:GetService("TweenService")
local monFocus = game.Workspace:WaitForChild("BigMon1")
local clickforward = script.Parent.Parent:WaitForChild("Next")
clickforward.Visible = false
local function typewrite(textlabel, text)
for i = 1, #text do
textlabel.Text = string.sub(text, 1, i)
wait(.01)
end
end
local function playerStory(part)
local player = Players:GetPlayerFromCharacter(part.Parent)
if not player then
local player = Players:GetPlayerFromCharacter(part.Parent.Parent)
if not player then return end
--print(player.Name .. " pressed me!")
if player.Progress.Value >= 1 then return end
player.Progress.Value = 1
local humanoid = player.Character.Humanoid
if humanoid ~= nil then humanoid.WalkSpeed = 0 end
debounce = true
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = cam.CFrame
wait(1.25)
player.PlayerGui.Dialogue.Frame.Visible = true
player.PlayerGui.Dialogue.Frame.Dialogue10.Visible = true
typewrite(script.Parent, "I'm not sure who you are, but you don't look like you're supposed to be here. Please leave...")
clickforward.Visible = true
clickforward.MouseButton1Click:wait()
humanoid.WalkSpeed = 16
camera.CameraType = Enum.CameraType.Custom
end
end
part.Touched:connect(playerStory)