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

Why is this frame not a member of screengui?

Asked by 4 years ago
Edited 4 years ago

Hello this is really confusing it use to work for me now it doesn't? heres my attempt

t = script.Parent.Touched:Connect(function()
t:Disconnect()
local g = script.gui:Clone()
g.Parent = game.Players:GetPlayerFromCharacter(hit.Parent).PlayerGui
wait()
for i = 1,50 do
g.frame.BackgroundTransparency = g.frame.BackgroundTransparency - 0.02
wait(0.01)
end
end)

This clone's into the players playergui but as soon as it tries to change the frame it has this error

f is not a valid member of ScreenGui
Stack Begin
Script 'Workspace.touchy.hit', Line 6
Stack End

My guess is the frame is not loading fast enough but it still doesn't make sense still it's a clone it's not loading anything ;/

0
Is it because the frame name has a cap at the start? isaacjh100 41 — 4y
0
try changing 'frame' to 'Frame' Leamir 3138 — 4y

1 answer

Log in to vote
1
Answered by 4 years ago

Hello, fistter1

I've made this script for you

I hope this works:

t = script.Parent.Touched:Connect(function()
t:Disconnect()
local g = script.gui:Clone()
g.Parent = game.Players:GetPlayerFromCharacter(hit.Parent).PlayerGui
wait()
for i = 1,50 do
g.Frame.BackgroundTransparency = g.Frame.BackgroundTransparency - 0.02
wait(0.01)
end
end)

I think it was not working because "Frame" is set to "frame".

Ad

Answer this question