Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

On Entered player only works in studio?

I have a script that when your in studio and you test it does what it is suppose to. :D But when I go to actually play the game, it doesn't. It doesn't do anything actually...

Here is the script:

local cscript = script:WaitForChild("CutsceneScript")
if script:findFirstChild("SkipCutsceneGuiValue") then
	script.SkipCutsceneGuiValue.Parent = cscript
	script.SkipCutsceneGui.Parent = cscript
end

function onPlayerEntered(player)
	wait()
	repeat wait () until player.Character:WaitForChild("Torso")
	local new_script = script.CutsceneScript:clone()
	new_script.Parent = player.Character
	new_script.Disabled = false
end

game.Players.PlayerAdded:connect(onPlayerEntered)
onPlayerEntered(game.Players:WaitForChild("player"))

1 answer

✓ Accepted answer

We'll since this is a cutscenes script you are using local player so this has to be in local script because it's single in studio so put it in a local script(try server script if already local)

8 comments

0

Its a regular script, ill try a local script and see how it works, thanks.

0

I tried placing it in starter player but didnt work, then i placed it into workspace (I didnt think it would work) and it didnt. Is there a way i should rescript (reword) this to make it fit better?

0

No problem tell me if it works because t should since it's locally

0

didnt work sadly

0

Sorry I think I know the problem your problem your script isn't set up locally and I would love to edit it for u but I gtg but that should give u enough Ido to fix it

0

I figured out the actual problem, the script actually works, but the script pasted doesnt.

0

It works now, Now i just need to figure out how to make it wait till player is ready, because if you dont have bc sometimes advertisements can get in the way of you viewing the cutscene

0

Great! I though it did feel free to upvote if u want!

This discussion is preserved as it was. New answers, comments, and votes are closed.