By the way, that fixed it.
Only issue is I can tell
didn’t work.
The reason is because you are changing the script inside the starter character scripts. When the game is running those scripts get transferred into the player’s PlayerScripts folder. So instead of StarterPlayer.StarterCharacterScripts.CamScript1
it is
game.Players.LocalPlayer.PlayerScripts.CamScript1
EDIT: the scripts inside the StarterCharacterScripts get transferred into the player’s character. So move the cam script inside the StarterPlayerScripts.
i love roblox
Also, it’s not- good i saw the edit, i was just about to say it’s not working, i possibly need to do CamScript1:Destroy()
instead of Disabled = true
Well if you don’t want it to repeat for the player again in that game session then do CamScript1:Destroy()
. Not that it won’t destroy for others.
Hmm that’s strange. Can you show the updated version of the cam script?
repeat wait()
until game:IsLoaded()
print "camera"
local camera = workspace.CurrentCamera
local cameraPart = workspace:WaitForChild("campart1") -- Add The Camera Part There
repeat wait()
camera.CameraType = Enum.CameraType.Scriptable
until camera.CameraType == Enum.CameraType.Scriptable
camera.CFrame = cameraPart.CFrame
print "done"
^^^ camscript, play button below
local btn = script.Parent
local sfx = script.Parent.Sound
local camera = workspace.CurrentCamera
local frame = script.Parent.Parent
local camscript1 = game.Players.LocalPlayer.PlayerScripts.CamScript1
btn.MouseButton1Click:Connect(function()
camscript1.Disabled = true
wait (0.1)
frame:TweenPosition(UDim2.new(0, 0, 1, 0))
camera.CameraType = Enum.CameraType.Custom
sfx:Play()
wait (1.3)
script.Parent.Parentdestroy()
end)
So I play tested it a bit on my own ended up removing the repeat wait() until game:IsLoaded()
from the cam script and it seems to work on Roblox servers now. Here is the game.
It’s private. I will try removing them now.
Not working. I removed that and it still wont work
I made the game public, you can try now.
Here are my versions of scripts btw:
print "camera"
local camera = workspace.CurrentCamera
local cameraPart = workspace:WaitForChild("campart1") -- Add The Camera Part There
repeat wait()
camera.CameraType = Enum.CameraType.Scriptable
until camera.CameraType == Enum.CameraType.Scriptable
camera.CFrame = cameraPart.CFrame
print "done"
local btn = script.Parent
local camera = workspace.CurrentCamera
local frame = script.Parent.Parent
local camscript1 = game.Players.LocalPlayer.PlayerScripts.CamScript1
btn.MouseButton1Click:Connect(function()
camscript1.Disabled = true
wait (0.1)
camera.CameraType = Enum.CameraType.Custom
wait (1.3)
script.Parent.Parent:Destroy()
end)
Hello! I have viewed this post many times, but have not been able to think of an answer. As I was scrolling through the Dev Forum, it occurred to me that you should try to update the game. To do this, if you already do not know, you go to as if you were saving it as a file, but instead click, “Save to Roblox as…”
Hopefully this solves your problem, I can’t wait to try out your game!
Now working. I have no idea wh y this is not working in the first place.
I think it didn’t work because the game hadn’t realized the changes you had made in studio. Testing in studio shows the changes you made, but unless you didn’t update the game, it will show the last update. Also, if I answered your question please be sure to mark it as the solution!
Could you send a game link so I can try yours?