LardLads
|
  |
| Joined: 16 Jun 2013 |
| Total Posts: 70 |
|
|
| 27 Nov 2016 06:58 AM |
I know this might be a stupid request, but I would love some help. I have stumbled across a problem in my recent game, I cannot figure out how to run the local script of CloneTrooper1019's Cutscene Editor. There are 3 options to put the Cutscene in to (Local, onTouch, onJoin) I used the Local so I could activate the script when the player clicks an object. If anyone could teach me how to run this script with a click detector, that would be great, thanks! |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2016 07:05 AM |
http://wiki.roblox.com/index.php?title=API:Class/ClickDetector
bottom of the page
in order to run that localscript you just have to set Disabled = false
|
|
|
| Report Abuse |
|
|
LardLads
|
  |
| Joined: 16 Jun 2013 |
| Total Posts: 70 |
|
|
| 27 Nov 2016 07:14 AM |
| I could already use the ClickDetector, I just don't know how to make it execute the local script. Thanks for the help! |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2016 07:19 AM |
"in order to run that localscript you just have to set Disabled = false"
|
|
|
| Report Abuse |
|
|
LardLads
|
  |
| Joined: 16 Jun 2013 |
| Total Posts: 70 |
|
|
| 27 Nov 2016 07:24 AM |
Yes, I have tried that.
local i = 0 local Debounce = false
workspace.Start.Button.Union.ClickDetector.MouseClick:connect(function(playerWhoClicked) game.Workspace.CutsceneScript.Disabled = false while i < 30 do Debounce = true workspace.Start.Button.Part.CFrame = workspace.Start.Button.Part.CFrame * CFrame.fromEulerAnglesXYZ(-0.025,0,0) wait(0.0001) i = i + 1 end end)
Still no progress. :/ |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2016 07:38 AM |
The script that the cutscene creator makes is a LocalScript, thus it's relative to one player (put it in PlayerGui or StarterPack)
|
|
|
| Report Abuse |
|
|
LardLads
|
  |
| Joined: 16 Jun 2013 |
| Total Posts: 70 |
|
| |
|
LardLads
|
  |
| Joined: 16 Jun 2013 |
| Total Posts: 70 |
|
|
| 27 Nov 2016 07:08 PM |
I am still having trouble. The cutscene will run whenever the game starts (if enabled and put in starter GUI) I have tried to clone the script into the starter GUI whenever the player clicks the ClickDetector, but still no luck.
This is one of my failed attempts: workspace.Start.Button.Union.ClickDetector.MouseClick:connect(function(playerWhoClicked) game.ServerScriptService.CutsceneScript.Disabled = false game.ServerScriptService.CutsceneScript:Clone().Parent = game.StarterGui end) |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2016 07:09 PM |
put the cutscene script in the startgui and have it disabled to begin with
then just enable it when you need it
i'm not any more should not the panda and? |
|
|
| Report Abuse |
|
|
LardLads
|
  |
| Joined: 16 Jun 2013 |
| Total Posts: 70 |
|
|
| 27 Nov 2016 07:14 PM |
Still no luck. The script is enabling whenever someone clicks it, it just isn't running.
If you would like to see the project I am attempting to do this on here it is: https://www.roblox.com/games/556058111/Wipeout-Final When the player clicks the lever. |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2016 07:17 PM |
Works fine for me when I do what I said
i'm not any more should not the panda and? |
|
|
| Report Abuse |
|
|
LardLads
|
  |
| Joined: 16 Jun 2013 |
| Total Posts: 70 |
|
|
| 27 Nov 2016 07:33 PM |
| Well, I figured out that what you said works, only when the player respawns. Is there any way to fix that? |
|
|
| Report Abuse |
|
|
LardLads
|
  |
| Joined: 16 Jun 2013 |
| Total Posts: 70 |
|
| |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 28 Nov 2016 10:20 AM |
You need to run the script when they join. Put it in replicatedfirst
|
|
|
| Report Abuse |
|
|
LardLads
|
  |
| Joined: 16 Jun 2013 |
| Total Posts: 70 |
|
|
| 28 Nov 2016 03:21 PM |
| Hey, this worked. Thanks a lot! |
|
|
| Report Abuse |
|
|
LardLads
|
  |
| Joined: 16 Jun 2013 |
| Total Posts: 70 |
|
|
| 28 Nov 2016 11:06 PM |
| Turns out this only works in Studio, not the playable game. Any ideas? |
|
|
| Report Abuse |
|
|
Mr_Code
|
  |
| Joined: 19 Oct 2011 |
| Total Posts: 135 |
|
|
| 28 Nov 2016 11:09 PM |
| Place the script in player GUI and enable it there |
|
|
| Report Abuse |
|
|
Mr_Code
|
  |
| Joined: 19 Oct 2011 |
| Total Posts: 135 |
|
|
| 28 Nov 2016 11:10 PM |
| A local script needs to know what client to run on, so it has specific places that it can run in (for example, a local script will never run in serverscriptstorage (ever) because the client can't see it |
|
|
| Report Abuse |
|
|
LardLads
|
  |
| Joined: 16 Jun 2013 |
| Total Posts: 70 |
|
|
| 28 Nov 2016 11:28 PM |
game.StarterGui.CutsceneScript.Disabled = false; Is this all I would need to put? Because the cutscene is still not running. |
|
|
| Report Abuse |
|
|
LardLads
|
  |
| Joined: 16 Jun 2013 |
| Total Posts: 70 |
|
| |
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 29 Nov 2016 04:01 AM |
"The script that the cutscene creator makes is a LocalScript, thus it's relative to one player (put it in PlayerGui or StarterPack)"
"workspace.Start.Button.Union.ClickDetector.MouseClick:connect(function(playerWhoClicked) game.ServerScriptService.CutsceneScript.Disabled = false game.ServerScriptService.CutsceneScript:Clone().Parent = game.StarterGui end)"
"game.StarterGui"
That's not PlayerGui. Replace game.StarterGui with game.Players:FindFirstChild(playerWhoClicked):FindFirstChild("PlayerGui") |
|
|
| Report Abuse |
|
|