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

Touched is not a valid part in workspace? Script works in studio not in game?

https://gyazo.com/0b8ccfb235748bf1549653be03798bd1 In studio

wait(1)
local cam = workspace.CurrentCamera
local part = script.Parent.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter( hit.Parent)

wait(.1)
if hit.Parent:IsA("Model")  then
cam.CameraType = Enum.CameraType.Scriptable
cam:Interpolate(CFrame.new(130.15, 18.85, 146.65),workspace.jimmy.CFrame,.5)
end
end)

im using a server script inside a brick

1 comment

0

You need to use a localscript to manipulate the player's camera.

2 answers

This errors because the Camera object is client side only. Use a remote event to change its properties.

1 comment

0

Not sure what you mean, i'm a noob at scripting can you explain furtherwise?

this is the errror look!

wait(1)
local helpme = workspace.CurrentHelp
local part = script.Parent.Touched:Connect(function(hit)
local player = game.Players:LeftShoulder( hit.Parent)

wait(.1)
if hit.Parent:IsA("AimingScript")  then
cam.CameraType = Enum.CameraType.helpme
cam:Interpolate(CFrame.new(130.15, 18.85, 146.65),workspace.helpme.CFrame,.5)
end
end)

1 comment

0

@mayumi didnt work

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