Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 5 years ago

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

0
You need to use a localscript to manipulate the player's camera. Amiaa16 3227 — 5y

2 answers

Log in to vote
0
Answered by 5 years ago

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

0
Not sure what you mean, i'm a noob at scripting can you explain furtherwise? Delithan 0 — 5y
Ad
Log in to vote
-1
Answered by 5 years ago

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)
0
@mayumi didnt work Delithan 0 — 5y

Answer this question