[Remote event troubles] Camera tween on join

I have used tweens to make a welcome screen i want to execute the event for it to run for a user on run but it keeps giving me this error:

image

Here is the code:

Code
local event = game.ReplicatedStorage.StageCam
game.Players.PlayerAdded:Connect(function(player)
	workspace.yourname.Value = player.Name
	
	print(player.Name .. " joined!")
	
	local pna = player.Name
	local pid = player.UserId
	
	
	event:FireClient(player.UserId)
	
end)

Please get back to me.

You are using an ObjectValue im guessing… assign it to a part from workspace by simply just doing something using getservice and waitforchild

No I am not, I want to to RUN the remove event when someone joines…

Change this

to this

event:FireClient(player)

Here is the original from when it was a command. game.ReplicatedStorage.StageCam:FireAllClients(player.Name, player.UserId)

You don’t need to create a special event to tween the camera when the player join the game , just put this script in StarterPlayerScripts and will automatically run when the player join the game

1 Like

Ok however this would make it happen when ever they reset, How can i do it when they only get it happen when they first join? (local script)

1 Like

Add bool Value to ReplicatedStorage and activate it for the first time

and Let the script check if this value is false then can tween the camera

here try this

local RS = game:GetService("ReplicatedStorage")
local IsFirstJoin = RS:FindFirstChild("IsFirstJoin")

if not IsFirstJoin then
	local v = Instance.new("BoolValue", RS) 
	v.Name = "IsFirstJoin"

	-- Tween the Camera
end